Hi all. I'm experiencing the 500 error some users have come across when using PHP5 with fastcgi. This is occuring our live server (CentOS), which is running lighty 1.4.18 and php 5.2.5 (both compiled from source). We also have a development server running lighty 1.4.15 and 5.2.1 (compiled with the same parameters as the live server) which does not experience this problem at all. Both servers are configured the same. My error log from lighttpd shows the following: 2008-01-02 06:28:01: (mod_fastcgi.c.2462) unexpected end-of-file (perhaps the fastcgi process died): pid: 9264 socket: unix:/tmp/php.socket9261-0 2008-01-02 06:28:01: (mod_fastcgi.c.3254) response not received, request sent: 1058 on socket: unix:/tmp/php.socket9261-0 for /view , closing connection PHP is set to log errors to a file, which remains empty other than one or two notices which occur due to the application I'm running. I've tried all the fixes from the other forums, but with no luck. I've tried turning xcache off, changing the number of php processes, etc. Nothing has helped. The only thing I can find that narrows it down is that it might be due to sessions in PHP. I tried switching our live server to memcache'd sessions, which caused the 500 error to occur more frequently and always threw a 500 when trying to clear the session. However, the same code works fine on our dev server. Any thoughts?
on 02.01.2008 14:36
on 08.01.2008 16:31
I had the same error on my site. All the fixes or workarounds I came across didnt work for me either. Luckily I was only displaying static info on the site so my workaround was to create a custom 500 error page. This can be set in lighty's config file. The custom error html page uses meta tags to wait 5 seconds before refreshing the page. By that stage the fastcgi backend was back up. This is a pretty ugly and brute force hack but it works for me. Obviously if you are dealing with dynamic data on the site, then a more involved workaround is needed.
on 08.01.2008 19:41
I'm having the same issue, and am certain this is a PHP issue, not Lighty. After starting the server, I get panic messages from the PHP process itself. There's some sort of weirdness with the libc library on CentOS 5 and PHP 5.2.5. I have not tried using 5.2.0, but plan to.
on 10.01.2008 17:25
After running with 5.2.0 overnight, I saw no issues. I suggest staying away from 5.2.5, it's definitely the problem.
on 23.01.2008 16:44
Jason Young wrote: > After running with 5.2.0 overnight, I saw no issues. > I suggest staying away from 5.2.5, it's definitely the problem. Running a year old PHP version is not cool :P If there is indeed an issue with 5.2.5 there must be a fix out there.
on 23.01.2008 17:49
Jason Young wrote: > After running with 5.2.0 overnight, I saw no issues. > I suggest staying away from 5.2.5, it's definitely the problem. What about 5.2.4 then?
on 25.01.2008 09:43
Olaf van der Spek wrote: > Jason Young wrote: >> After running with 5.2.0 overnight, I saw no issues. >> I suggest staying away from 5.2.5, it's definitely the problem. > > What about 5.2.4 then? According to this it works in 5.2.4 but I have not confirmed it. Has anyone tried? http://bugs.php.net/bug.php?id=43476 Also they say that is was fixed in a snapshot, can anyone confirm this?
on 25.01.2008 09:55
Kaah wrote: > Olaf van der Spek wrote: >> Jason Young wrote: >>> After running with 5.2.0 overnight, I saw no issues. >>> I suggest staying away from 5.2.5, it's definitely the problem. >> >> What about 5.2.4 then? > > According to this it works in 5.2.4 but I have not confirmed it. Has > anyone tried? > http://bugs.php.net/bug.php?id=43476 > > Also they say that is was fixed in a snapshot, can anyone confirm this? There is this patch but it did not solve it for us. http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.c?r1=1.202.2.7.2.15&r2=1.202.2.7.2.16&pathrev=PHP_5_2&diff_format=u
on 04.02.2008 14:09
Kaah wrote: > Kaah wrote: >> Olaf van der Spek wrote: >>> Jason Young wrote: >>>> After running with 5.2.0 overnight, I saw no issues. >>>> I suggest staying away from 5.2.5, it's definitely the problem. >>> >>> What about 5.2.4 then? >> >> According to this it works in 5.2.4 but I have not confirmed it. Has >> anyone tried? >> http://bugs.php.net/bug.php?id=43476 >> >> Also they say that is was fixed in a snapshot, can anyone confirm this? > > There is this patch but it did not solve it for us. > http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.c?r1=1.202.2.7.2.15&r2=1.202.2.7.2.16&pathrev=PHP_5_2&diff_format=u We are going to try out 5.2.0 and see how it goes. If it works stable 24h we will upgrade to 5.2.1 and so on until it breaks :P

