Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

start /b php-cgi -c .\php-debug.ini  -b 127.0.0.1:521
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 = (
    "mod_access",
    "mod_accesslog",
    "mod_rewrite",
    "mod_redirect",
    "mod_evhost",
    "mod_fastcgi",
    "mod_status"
)

fastcgi.server = ( 
    ".php" => (
        "localhost" => (
            "host" => "127.0.0.1", 
            "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 127.0.0.1:521 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

 
discard

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

Browse other questions tagged or ask your own question.