I downloading craft with Composer, but when i move on example.com/index.php?p=admin nothing happens. In the logs:

PHP Warning:  require_once(): open_basedir restriction in effect. File(/home/User/web/example.com/vendor/autoload.php) is not within the allowed path(s): (/home/User/web/example.com/public_html:/home/User/tmp) in /home/User/web/example.com/public_html/index.php on line 11
PHP Warning:  require_once(/home/User/web/example.com/vendor/autoload.php): failed to open stream: Operation not permitted in /home/User/web/example.com/public_html/index.php on line 11
PHP Fatal error:  require_once(): Failed opening required '/home/User/web/example.com/vendor/autoload.php' (include_path='.:/opt/remi/php70/root/usr/share/pear:/opt/remi/php70/root/usr/share/php:/usr/share/pear:/usr/share/php') in /home/User/web/example.com/public_html/index.php on line 11
  • I solved this problem, but I do not know if it's safe. In /home/User/conf/web/example.com.httpd.conf in string php_admin_value open_basedir /home/User/web/example.com/public_html:/home/Userl/tmp replace on php_admin_value open_basedir /home/User/web/example.com:/home/Userl/tmp Jul 30 '18 at 12:06
  • Seems like a perfectly valid solution to me... would you mind adding it as an official answer in case it helps someone in the future?
    – Brad Bell
    Jul 30 '18 at 21:26

I solved this problem. In /home/User/conf/web/example.com.httpd.conf in string

php_admin_value open_basedir/home/User/web/example.com/public_html:/home/Userl/tmp

replace on

php_admin_value open_basedir /home/User/web/example.com:/home/Userl/tmp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.