Runnng PHP as FastCGI instead of DSO - Internal Server Error

DReade83

Well-Known Member
Oct 20, 2006
196
0
166
Cheshire, UK
I've rebuilt Apache to include FastCGI and mod_fcgi, set PHP from DSO to FastCGI, but every site gives me a "Internal Server Error" message. Switching back to DSO and we're OK.

Is there something I've missed?

I'm not using SuPHP or mod_security, but I am using eAccelerator and Suhosin.

Can anyone help?

Many thanks.
 

Sindre

Well-Known Member
Aug 25, 2008
46
0
56
FastCGI requires some manual configuration for it to work.
I am having this problem as well. Exactly what configuration do you need to do? And in which file(s)? "some configuration" isn't really that helpful.

There is almost no information around about running PHP in FastCGI mode with cPanel.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
I am having this problem as well. Exactly what configuration do you need to do? And in which file(s)? "some configuration" isn't really that helpful.

There is almost no information around about running PHP in FastCGI mode with cPanel.
There is very little difference in configuring FastCGI for a cPanel environment as for a non-cPanel environment. The chief difference is where to place the configuration. We recommend an include file such as found in the Includes Editor in Apache Setup within WHM.

The other difference is you set the handler using the Configure PHP and SuExec interface in WHM to FastCGI instead of modifying files manually.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
FastCGI is supposed to be faster than suPHP, although it might depend upon your particular FastCGI configuration.
 

McPhil

Active Member
Sep 20, 2007
26
0
51
I've rebuilt Apache to include FastCGI and mod_fcgi, set PHP from DSO to FastCGI, but every site gives me a "Internal Server Error" message. Switching back to DSO and we're OK.

Is there something I've missed?

I'm not using SuPHP or mod_security, but I am using eAccelerator and Suhosin.

Can anyone help?

Many thanks.
You have to edit your .htaccess file(s). If you have a memory limit in the .htaccess file you need to remove it or comment it out:

Example:

If this is in your .htaccess file:

php_value memory_limit "512M"

change to:

#php_value memory_limit "512M"
 
Last edited: