Apache, PHP, suPHP Problems

Last night if you tried visiting you might have gotten some errors on the site. I upgraded the servers which included a slightly newer version of PHP, Apache, and suPHP.

Everything upgraded fine but websites would not load. After some digging it was apparent that the problem was directly related to the PHP setting open_basedir. I have each virtual host configured to use its own php.ini file and that file was not being used, trying instead to use the default php.ini file in /etc/php. Which of course did not have the correct open_baseidir settings.

For some reason Apache or PHP stopped caring about the lines in my httpd-vhosts.conf file that stated:

SetEnv PHPRC /path/to/specific/php.ini

I could never find out why it was ignoring this line now. But after some research I found another that provides the same thing. Since I am using suPHP I went with the following for each vhost.

suPHP_ConfigPath /path/to/specific/folder/containing/php.ini

It’s a little frustrating that I cannot name the php config files after the vhosts because it wants a folder path without a file name, but it will do for now.

Another site that might help.

By |June 5th, 2013|0 Comments

Leave A Comment