Custom PHPINIDir setting in VirtualHost affecting other VirtualHosts
- by Radio
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?