I just found out that overriding php.ini settings in the vhost configuration does not work on Apache with suPHP.
The system is Ubuntu Server Edition 14.04 LTS and I installed Apache + PHP like this:
apt-get install apache2 apache2-mpm-prefork apache2-utils php5
Without changing any settings, the following vhost works out-of-the-box:
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/html/public
php_admin_value open_basedir /var/www/html
</VirtualHost>
One can verify that the "open_basedir" setting is honored with phpinfo().
However, after installing suPHP and suExec:
apt-get install libapache2-mod-suphp apache2-suexec
a2enmod suexec
phpinfo() shows that the values are still those set in "/etc/php5/cgi/php.ini".
This is true not only for open_basedir, but for any setting I try to override with either php_admin_value
or php_value
.
Is there any way to make the above setup work?