PHP, SuExec, FastCGI and Apache 1.3.x

asterisk

Well-Known Member
Nov 11, 2005
61
0
156
Hi,

I have been cracking my head several days over this and would really appreciate any help on this please. I've installed FCGI 2.4.0 and mod_fastcgi 2.4.2 for Apache 1.3.x as a DSO.

My addition to httpd.conf is as follows:


Code:
<IfModule mod_fastcgi.c>
    FastCgiIpcDir /tmp/fcgi_ipc/
    AddHandler fastcgi-script .fcgi
    FastCgiWrapper On
    FastCgiConfig -autoUpdate -singleThreshold 100 -killInterval 300 -idle-timeout 240 -pass-header HTTP_AUTHORIZATION
    Action application/x-httpd-fastphp /php.fcgi
    AddType application/x-httpd-fastphp .php .php4 .php3
</IfModule>
/tmp/fcgi_ipc is owned by nobody with 755 permissions.

And php.fcgi is a shell script in each user's public_html directory with the following code:

Code:
#!/bin/sh
PHP_FCGI_CHILDREN=2
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/local/apache/cgi-bin/php-cgi
php-cgi -v is as follows:


Code:
PHP 4.4.2 (cgi-fcgi) (built: Mar 28 2006 22:06:09)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with Zend Extension Manager v1.0.9, Copyright (c) 2003-2006, by Zend Technologies
    with Zend Optimizer v2.6.2, Copyright (c) 1998-2006, by Zend Technologies
I'm currently getting the error below in my error_log and on the front end, I get a 500 Internal Server Error via the browser when I try to read PHP files off Apache now. Any help from those who have had this setup working would be a great help here. Have been reading the manuals and on google but they seem a lil sketchy or otherwise for Apache 2 config.

Code:
[warn] FastCGI: (dynamic) server "/home/mainuser/public_html/php.fcgi" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds
Thank you so much.
 
Last edited:

asterisk

Well-Known Member
Nov 11, 2005
61
0
156
By the way, if anyone has performed an installation on FastCGI, PHP and SuExec, would really appreciate if you could show your FastCGI's IfModule configuration in httpd.conf please.

I reckon it may be something wrong with my IfModule's configuration but I'm not exactly sure what as I've followed the docs to a T.

Cheers.
 

intel352

Well-Known Member
Nov 25, 2003
55
0
156
NC, USA
were you able to get this working? if so, got a howto for us?

i've been doing some reading, apparently EDGE has suPHP support, along with a new EasyApache script (easyapache2), but they're having issues with it as well. according to some users, there are a number of patches you'll need to apply to get suphp to work with cpanel

hrmph, that's a shame.