Custom PHPINIDir setting in VirtualHost affecting other VirtualHosts

Posted by Radio on Server Fault See other posts from Server Fault or by Radio
Published on 2012-12-29T21:51:16Z Indexed on 2013/10/20 15:57 UTC
Read the original article Hit count: 556

Filed under:
|
|

One of the clients requested a personal php.ini configuration for his website, so I have set his VirtualHost as follows:

<VirtualHost *:80>
    DocumentRoot "/home/alex/www.domain.tld"
    ServerName www.domain.tld
    AssignUserID alex alex
    PHPINIDir /home/alex/php.ini
</VirtualHost>

The client created php.ini file under /home/alex/ which contains only this setting:

session.save_path = "/home/alex/.php_sessions/"

Afterall he started to complaint that he sees all other session files generated by other clients' websites.

After doing some basic troubleshooting, I realized, that his php.ini settings are affecting all websites specified in the httpd-vhosts.conf.

Question is why? Since PHPINIDir is only specified inside one specific VirtualHost?

© Server Fault or respective owner

Related posts about apache2

Related posts about php