If you're receiving following error while accessing your Opencart web site:
open_basedir restriction in effect. File(/) is not within the allowed path(s):
Please follow the below steps to fix this issue for Opencart installation:
-
After installation, open data directory. In your case it is /home/username/ocartdata
-
Open file from file manager in edit mode: /ocartdata/storage/vendor/twig/twig/src/Loader/FilesystemLoader.php
-
On line number 90 replace following below code:
$checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path;
with
$checkPath = $this->rootPath.$path;
Save the file and check the front-end, it should be working without any issue.