Installation error: "cannot parse the path_info or orig_path_info" caused by open_basedir restriction
Permalink
Hi, new member here. Trying to install concrete5 and I stumbled on this error after selecting the language. Searching for similar errors and trying to apply various fixes, including "cgi.fix_pathinfo=1" didn't do the trick. Then I've accessed the urls that were returning 500 in the Apache access_log and I got this beauty here:
Whoops \ Exception \ ErrorException (E_WARNING)
is_dir(): open_basedir restriction in effect. File(/var/lib/php/session) is not within the allowed path(s): (/var/www/vhosts/domain.com.au/httpdocs/:/tmp/)
The stacktrace points to /var/www/vhosts/domain.com.au/httpdocs/concrete/src/Session/Storage/Handler/NativeFileSessionHandler.php line 50.
The workaround was to set another session_save_path value for this vhost that points to a directory under /var/www/vhosts/domain.com.au/httpdocs, but it shouldn't be necessary. The session handler code could do with some cleanup.
Looking forward to what others thoughts are. Thanks for looking into it.
Whoops \ Exception \ ErrorException (E_WARNING)
is_dir(): open_basedir restriction in effect. File(/var/lib/php/session) is not within the allowed path(s): (/var/www/vhosts/domain.com.au/httpdocs/:/tmp/)
The stacktrace points to /var/www/vhosts/domain.com.au/httpdocs/concrete/src/Session/Storage/Handler/NativeFileSessionHandler.php line 50.
The workaround was to set another session_save_path value for this vhost that points to a directory under /var/www/vhosts/domain.com.au/httpdocs, but it shouldn't be necessary. The session handler code could do with some cleanup.
Looking forward to what others thoughts are. Thanks for looking into it.
is path_info activated in your php?
Thanks for replying. The website is running Apache + php-fpm and the AcceptPathInfo directive is unset (Default). In "Environment & details" I get:
Server/Request Data
[...]
PATH_TRANSLATED /var/www/vhosts/domain.com.au/httpdocs/install/web_precondition/request_urls/20
PATH_INFO /install/web_precondition/request_urls/20
[...]
Environment Variables
[...]
PATH_TRANSLATED /var/www/vhosts/domain.com.au/httpdocs/install/web_precondition/request_urls/20
PATH_INFO /install/web_precondition/request_urls/20
[...]
Server/Request Data
[...]
PATH_TRANSLATED /var/www/vhosts/domain.com.au/httpdocs/install/web_precondition/request_urls/20
PATH_INFO /install/web_precondition/request_urls/20
[...]
Environment Variables
[...]
PATH_TRANSLATED /var/www/vhosts/domain.com.au/httpdocs/install/web_precondition/request_urls/20
PATH_INFO /install/web_precondition/request_urls/20
[...]