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

While trying to configure php-cgi on a CentOS 5 server running nginx, I run into this:

[root@~~~~~~~ run]# /etc/init.d/php_cgi start

Starting php-cgi: spawn-fcgi: child exited with: 255

                                                      [FAILED]

I'm not 100% sure what's happening here, but no Google result returns anything regarding error code 255.

I was following [this guide][1] to set up php-cgi. What could the problem be?

share|improve this question

2 Answers 2

lighttpd and lighttpd-fastcgi both don't provide the binary that is supposed to be started with the script he provides. (/usr/bin/spawn-fcgi).

You'd better ask the guy who wrote the tutorial where he get /usr/bin/spawn-fcgi because on my server there is no way to install it with yum. He says "Install spawn-fcgi package using yum command" but it doesn't work.

Make sure you use the same repositories than him, with the same version of centos.

share|improve this answer
    
yum install spawn-fcgi worked for me though. =\ –  EJay Oct 15 '10 at 12:50
2  
You may find you get better use out of PHP-FPM; PHP-FPM has been included in the PHP source code since 5.3.2. It negates the need for spawn-fcgi. I'm having a lot of success with it and Nginx. –  Andrew Taylor Jan 25 '11 at 10:21
    
Do note that FPM support is not enabled in RHEL's RPMs, so if you plan on having your distribution continue to provide security updates for your PHP version, stick with spawn-fcgi from EPEL. It works fine. –  jgoldschrafe Oct 6 '11 at 16:24

To solve this issue, I deleted /etc/sysconfig/spawn-fcgi

It appears to be working now.

Edit:

Sorry, this is not the solution.

When installing php-cli it will install a php-fpm, not the original php-cli.

Remove all php packages yum remove php*and try to install the php53 binaries yum install php53*.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.