FastCGI errors after PHP upgrade

I ran into a small problem upgrading PHP from 5.3.5 to 5.3.10 on a MediaTemple CentOS VPS today. The upgrade completed without any errors, but when I reloaded the site I got a “500 Internal Server Error” message. It was the stock installation, so I’m not sure which module it was using or what repository it came from, but I was upgrading it from the Atomic repository, which loads the FastCGI module by default. The odd thing is that it worked fine on the dev VPS, but not on production.

It turned out to be an easy fix once I figured out the problem, though; I just had to change the ownership of /var/www/cgi-bin and it’s contents so that the apache user could execute cgi_wrapper.

Here’s what was turning up in the error logs:

Apache vhost error_log

[warn] [client xx.xx.xx.xx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[error] [client xx.xx.xx.xx] Premature end of script headers: index.php


suexec policy violation: see suexec log for more details


uid: (10001/username) gid: (505/505) cmd: cgi_wrapper


target uid/gid (10001/505) mismatch with directory (0/0) or program (0/0)
uid: (10001/username) gid: (505/505) cmd: cgi_wrapper

3 thoughts on “FastCGI errors after PHP upgrade

  1. Hola, en tu entrada pone que tiene fácil solución, pero yo no veo ninguna solucion. ¿Cual es la solucion?

Leave a Reply to Lorenzo Sastre Muntaner Cancel reply

Your email address will not be published. Required fields are marked *