Php-fpm start error

PHP

I am using php-fpm. I recently recompiled php for including imap functions. But on php-fpm start it gives the following error:

Starting php_fpm Error in argument 1,
char 1: no argument for option –
Usage: php-cgi [-q] [-h] [-s] [-v]
[-i] [-f ] php-cgi [args…]
-a Run
interactively
-C Do not chdir to the
script's directory
-c | Look for
php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar]
Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f Parse . Implies
`-q'
-h This help -i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-q Quiet-mode. Suppress HTTP Header output.
-s Display colour syntax highlighted source.
-v Version number
-w Display
source with stripped comments and
whitespace.
-z Load Zend extension
……………………………..
failed

What could be the problem? Is it in php-fpm.conf or php.ini.

Best Answer

You need reconfigure and recompile php sources. Remember about make clean if you do it again and again. Php-fpm patch for php 5.2 branch can be download from here: http://php-fpm.org/ 5.3 and 5.4 branch has php-fpm included.

Crucial options for compiling php 5.2 with php-fpm:

--enable-fastcgi --enable-fpm --enable-force-cgi-redirect

Location of php-fpm.conf depends on your prefix. If you chose /usr/local/ it should be in /usr/local/etc in case of 5.2

For php 5.3 and 5.4:

--enable-fpm --with-fpm-user=http --with-fpm-group=http

Group and user fit only for my distro. Use proper for yours.

For my installation of 5.4 I chose --sysconfdir=/etc/php54 so php-fpm.conf it's just right there.