Error when uploading Symfony app

Website URL

http://ectaclick.epizy.com/

Error Message

Warning: require_once(): open_basedir restriction in effect. File(/home/vol6_2/epizy.com/epiz_33846243/vendor/autoload_runtime.php) is not within the allowed path(s): (/php_sessions:/tmp:/var/www/errors:/usr/share/pear:/home/vol6_2/epizy.com/epiz_33846243/htdocs) in /home/vol6_2/epizy.com/epiz_33846243/htdocs/index.php on line 5

Warning: require_once(/home/vol6_2/epizy.com/epiz_33846243/vendor/autoload_runtime.php): failed to open stream: Operation not permitted in /home/vol6_2/epizy.com/epiz_33846243/htdocs/index.php on line 5

Fatal error: require_once(): Failed opening required '/home/vol6_2/epizy.com/epiz_33846243/vendor/autoload_runtime.php' (include_path='.:/usr/share/pear/') in /home/vol6_2/epizy.com/epiz_33846243/htdocs/index.php on line 5

Other Information

I moved all filed in public folder to htdocs folder

Make sure that the line(s) of code that call the file have also been updated to reflect that change

The problem comes from the php configuration, the variableopen_basedir contains /php_sessions:/tmp:/var/www/errors:/usr/share/pear:/home/vol6_2/epizy.com/epiz_33846243/htdocs so I can’t access to the parent folders/files and so to the vendor folder

It seems that you tried to move your website’s source code outside of the htdocs folder of your site. That’s not going to work, because our PHP installations are restricted to only allow access to files within the htdocs folder of that specific website.

If you want to setup a website that normally has the publicly accessible files in a subfolder, you’ll still need to upload all your website files to the htdocs folder. After that, you can use .htaccess rules to restrict access to the root folder and direct requests to the public folder.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.