Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Currently, this is how I start PHP and lighttpd and it works fine:

start /b php-cgi -c .\php-debug.ini  -b
start /b LightTPD.exe 

Once and awhile PHP crashes and I get 503 errors until I start it again. I would like to configure lighttpd to manage PHP instances so it can restart PHP for me. I modified my lighttpd config by adding bin-path.

server.modules = (

fastcgi.server = ( 
    ".php" => (
        "localhost" => (
            "host" => "", 
            "port" => 521, 
            "bin-path" => "C:\PHP\php-cgi.exe",
            "broken-scriptfilename" => "enable" 

When I start lighttpd, I see the following in my error log - it doesn't matter if php is running or not.

2013-01-26 16:23:20: (log.c.166) server started
2013-01-26 16:23:20: (mod_fastcgi.c.1103) the fastcgi-backend C:\PHP\php-cgi.exe failed to start:  
2013-01-26 16:23:20: (mod_fastcgi.c.1107) child exited with status 0 C:\PHP\php-cgi.exe
2013-01-26 16:23:20: (mod_fastcgi.c.1110) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version. If this is PHP on Gentoo, add 'fastcgi' to the USE flags.  
2013-01-26 16:23:20: (mod_fastcgi.c.1397) [ERROR]: spawning fcgi failed.  
2013-01-26 16:23:20: (server.c.982) Configuration of plugins failed. Going down.

I have tried playing with bin-path by adding/removing/editing the arguments -c .\php-debug.ini -b I usually pass to PHP.

Any advice?

share|improve this question
Use php-fpm instead. – Michael Hampton Jan 27 '13 at 1:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.