0

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.

splattne
  • 28,348
  • 19
  • 97
  • 147
Sujay
  • 31
  • 1
  • 7

3 Answers3

2

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.

Lucas Kauffman
  • 16,818
  • 9
  • 57
  • 92
shark555
  • 146
  • 3
0

When i reinstall php, the config file for php-fpm is located at /usr/etc/, however the old poisition is at /etc. After copying php-fpm.conf from /etc to /usr/etc php-fpm works again.

Lamnk
  • 1,075
  • 3
  • 11
  • 17
0

argument 1, char 1: no argument for option -

Note the "-" at the end.

How do you run it?

Any changes in startup script? Post the startup script (pastebin.com), also, how did you compile it.

Hope you've used src.rpm (CentOS - PHP - Yum Install with Custom ./configure params)

GioMac
  • 4,444
  • 3
  • 24
  • 41