Bug #391
HTTP Error 500, SuExec and Fcgi Debugging
Description
I have encountered problem where I have been getting error 500 on my webserver. Because the error logs are simply cryptic, general and misleading, or even non-existent, I needed a trick that allowed me to figure out the reason for the errors without relying much on the logs. Here is a short documentation of the method i used:
Emulation of suexec + fcgi:¶
- On the command line, switch to the user that is executing the php scripts:
su - user1
this might fail because this user might not have a login shell (login shell set to /bin/false
for example); thus you might need to edit /etc/passwd
and set a loginshell for this user; lets say /bin/bash
. its a good idea to use vipw instead of vi (you need to do this as root).
- Now cd to the directory where you have your .php files, and try something like this:
cd /var/www/www.example.com cat index.php | /var/www/fcgi/www.example.com/php5-fcgi-starter
This should reveal more info about the error that what you are getting (or not getting) in the logs or in the browser. the file output is being piped to is the fcgi php wrapper.