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.

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.

share|improve this question

3 Answers 3

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.

share|improve this answer
    
Worked for me (php 5.2.17 + fpm patch) –  Strae Aug 1 '13 at 8:35

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.

share|improve this answer

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)

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.