• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

vhost.conf is not working properly

FollowTheMedia

New Pleskian
Hi there! I've just bought a license of Plesk and I've got a problem.

A web application written using the Zend Framework is giving me the "open_basedir" error.
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/php/ZendX/Application/Resource/Frontcontroller.php) is not within the allowed path(s): (/var/www/vhosts/yeah.com/httpdocs:/tmp) in /var/www/vhosts/yeah.com/httpdocs/application/library/Zend/Loader.php on line 198

I followed the instructions listed in this page, but the script is still not working.

This is the situation in the conf folder.
root@whoa:/var/www/vhosts/yeah.com/conf# ls -l
total 56
-rw-r----- 1 root www-data 6350 2011-08-27 01:52 13144027300.77367600_httpd.include
-rw-r----- 1 root www-data 6417 2011-08-27 03:43 13144094000.79830400_httpd.include
-rw-r----- 1 root www-data 6417 2011-08-27 03:44 13144094850.51175900_httpd.include
-rw-r----- 1 root www-data 6417 2011-08-27 03:48 13144096850.96200400_httpd.include
-rw-r----- 1 root www-data 6417 2011-08-27 03:53 13144100240.58345500_httpd.include
-rw-r----- 1 root www-data 6488 2011-08-27 04:01 13144104780.03215000_httpd.include
-rwxrwxrwx 1 root root 166 2011-08-27 04:00 vhost.conf
-rwxrwxrwx 1 root root 166 2011-08-27 04:00 vhost_ssl.conf

This is the content of both vhost.conf and vhost_ssl.conf files
<Directory /var/www/vhosts/yeah.com/httpdocs>

php_admin_value open_basedir "/var/www/vhosts/yeah.com/httpdocs:/tmp:/usr/share"

</Directory>

At the end, I ran the following command:
root@whoa:/# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

Nothing to do.
As you can see in the error, the /usr/share path is not added into the "open_basedir" path. Why?

Can you help me?

Thanks in advice :(
 
Last edited:
Solved. For some reasons, the open_basedir path is defined into /var/www/vhosts/yeah.com/etc/php.ini and there is no way to override the php.ini by writing stuff into vhost.conf
Unfortunately I'll have to manually modify each php.ini file :(

I've got another question for you guys :D
Is there a way to automatically "flush" all the older and not used .include files listed above?
 
Last edited:
Back
Top