FastCGI + PHP not working

Hello,

I'm trying to get FastCGI to run normal php scripts from mod_fastcgi.
The documentation seems outdated. So far I have done the following:

-------downloaded and re-installed php, with:
../configure --enable-fastcgi (no errors)
make
make install
cp /usr/local/bin/php /usr/local/apache2/htdocs/fcgi/php-fcgi
(actually, it also created a /usr/local/bin/php-cgi, and I tried that
as well; not sure if that's the one we want or what).


---------put this in httpd.conf (as you can see I've tried a few other
approaches too):
LoadModule fastcgi_module modules/mod_fastcgi.so
<IfModule mod_fastcgi.c>
#AddType application/x-httpd-fastphp .fphp

# Dynamic Settings
<Directory /usr/local/apache2/htdocs/fcgi>
Options +ExecCGI
SetHandler fastcgi-script
</Directory>

#AddHandler fastcgi-script fcgi fphp

# Static Settings
FastCgiServer /usr/local/apache2/htdocs/fcgi/php-fcgi # <--
tried with and without.
# FastCgiConfig -singleThreshold 1

Action fastcgi-script /fcgi/php-fcgi
Action x-httpd-fastphp /fcgi/php-fcgi
</IfModule>
---------------------------------

Currently, the server will run regular fastcgi apps (say, written in C
using the FCGX_Accept loop) that are in /fcgi correctly, but not
regular php scripts. logs/error_log gives this repeatedly:

[warn] FastCGI: (dynamic) server "/usr/local/apache2/htdocs/fcgi/
mesh.php" has failed to remain running for 30 seconds given 3
attempts, its restart interval has been backed off to 600 seconds

So it appears it's still running php scripts with the normal mod_php,
or else the newly-compiled php isn't working (When I just run fcgi/php-
fcgi somescript.php, it spews out the contents just like regular;
isn't it supposed to fork and await input from the server?).

Docs are sparse, help appreciated.

--
Blitzen
drblitzkrieg [ Fr, 18 Januar 2008 09:27 ] [ ID #1911404 ]
Webserver » alt.apache.configuration » FastCGI + PHP not working

Vorheriges Thema: Mobile clients identification?
Nächstes Thema: tips for optimizing php Web proxy sites?