Blog

FastCGI: 500 Internal Server Error

Tags: 500 Internal Server ErrorAddHandlerphp5.fcgi

Published on: July 17, 2014 by Geo Paul

FastCGI: 500 Internal Server Error

Scenario:

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

/etc/init.d/httpd restart

 

 

 

Category : Apache, cPanel, Howtos, Linux

Geo Paul

Geo Paul

Geo Paul has good customer management skills and is ready to take up additional responsibilities whenever required. His analytical assessment and adaptability to changing situations and circumstances, makes him one of the highly preferred admin by various clients. He is a jovial guy and love to live life to the fullest.

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Categories

Your Cart

Cart is empty.

Subtotal
₹0.00
APPLY
0
Send this to a friend