Published on: July 17, 2014 by Geo Paul
If you are running a WHM/cPanel and have FastCGI enabled in Apache you may find the following error which caused your website to hang and display the ’500 Internal Server Error’ message. Let us see how to fix this FastCGI 500 error,
1. Open .htaccess for the account and add the following lines.
AddHandler php5-fastcgi .php Action php5-fastcgi /cgi-bin/php5.fcgi
2. Source your main server php.ini which is located in /usr/local/lib/.
cd /home/user/public_html/cgi-bin/ cp -a /usr/local/lib/php.ini . chown user:user php.ini
3. Create the wrapper script.
For that create a file in your current directory (cgi-bin) called php5.fcgi and add
#!/bin/sh export PHP_FCGI_CHILDREN=1 export PHP_FCGI_MAX_REQUESTS=10 exec /usr/local/cpanel/cgi-sys/php5
4. Make sure the correct permission and ownership is given.
chown user:user php5.fcgi chmod 0755 php5.fcgi
5. Restart Apache
Category : Apache, cPanel, Howtos, Linux