Not able to enable php fastcgi on lighttpd
Added by redlotus128 over 13 years ago
Hi,
I am trying to install Lighttpd with php on an ARM Platform. I installed lighttpd and php however I have been facing problems when trying to start the lighttpd webserver.
- php-cgi -v
It returns:
PHP 5.2.11 (cgi-fcgi) (built: Nov 3 2011 11:06:13)
Copyright (c) 1997-2009 THE PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
- lighttpd -v
The following is returned:
lighttpd-1.4.18 - a light and fast webserver
Build-Date: Oct 28 2011 14:08:03
When I try to install lighttpd and start the webserver the following errors are returned:
2011-10-28 15:47:55: (mod_fastcgi.c.990) chdir failed: No such file or directory /usr/local/bin/php2011-10-28 15:47:55: (mod_fastcgi.c.999) execve failed for: /usr/local/bin/php No such file or directory
- 2011-10-28 15:47:55: (mod_fastcgi.c.1025) the fastcgi-backend /usr/local/bin/php failed to start:
2011-10-28 15:47:55: (mod_fastcgi.c.1029) child exited with status 2 /usr/local/bin/php
2011-10-28 15:47:55: (mod_fastcgi.c.1032) If you're trying to run PHP as a FastCGI backend, make sure you're using the FastCGI-enabled version.
You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT '(cgi)' NOR '(cli)'.
For more information, check http://trac.lighttpd.net/trac/wiki/Docs%3AModFastCGI#preparing-php-as-a-fastcgi-programIf this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2011-10-28 15:47:55: (mod_fastcgi.c.1336) [ERROR]: spawning fcgi failed.
2011-10-28 15:47:55: (server.c.895) Configuration of plugins failed. Going down.
#which php
It returned:
- usr/bin/php-cgi.
I changed the lighttpd.conf line:
fastcgi.server = ( ".php" =>
("localhost" =>
(
"socket" => "/tmp/php-fastcgi-socket"'
"bin-path" => "/usr/bin/php-cgi"
)
)
)
Though I changed this one the lighttpd config still is searching for php in /usr/local/bin:
2011-11-03 112:34:21: (mod_fastcgi.c.990) chdir failed: No such file or directory /usr/local/bin/php-cgi
Is there some other place in the lighttpd.conf that I might have missed with regard to changing the path?
Any help/suggestions on how to fix this one would be very much appreciated.
Best Regards,
JM