Per-user php.ini needs both a php4 version and a php5 version

On systems where PHP5 is the default version (thus having /etc/php.ini) PHP4 can't possibly work under mod_fcgid, because the php.ini has directives that are unrecognized by php4. The error that results from this is either:

[Sun Jun 03 21:05:12 2007] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Sun Jun 03 21:05:12 2007] [error] [client 64.9.235.244] Premature end of script headers: test.php4

With mod_fcgid 2.0, or:

[Sun Jun 03 12:57:23 2007] [notice] mod_fcgid: process /home/blahblah/public_html/test.php(14725) exit(communication error), get unexpected signal 11

With mod_fcgid 1.0. It always results in an error 500 regardless of version. Configuring the fcgi wrapper to point to ../etc/php4 (where ~/etc/php4 contains php.ini from /etc/php4/php.ini) corrects the problem. So, we need to copy in both a PHP5 and PHP4 version of the php.ini (a php4 .ini will possibly work for php5, but I suspect we're asking for trouble...it's also a bit time-consuming to debug the problem...one day we'll forget that this can cause this particular set of errors).

The location of the PHP4 php.ini file is /etc/php4/php.ini on all systems that we provide PHP4 RPM packages for, but not for systems that default to PHP4 (where the reverse is true.../etc/php5/php.ini). On Ubuntu, it's /etc/php4/cgi/php.ini.

It's kind tricky to figure out, I think... On Ubuntu, /etc/php4 and /etc/php5 exist (and I guess we're pulling from /etc/php5/cgi/php.ini).

Status: 
Closed (fixed)