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.

I ran the following command:

/usr/local/php/sbin/php-fpm start

but the output is:

Usage: php-fpm [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p <prefix> ] [-c <file>] [-d foo[=bar]] [-y <file>]
  -c <path>|<file> 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
  -h               This help
  -i               PHP information
  -m               Show compiled in modules
  -v               Version number
  -p, --prefix <dir>
                   Specify alternative prefix path to FastCGI process manager (default: /usr/local/webserver/php).
  -y, --fpm-config <file>
                   Specify alternative path to FastCGI process manager config file.
  -t, --test       Test FPM configuration and exit

Is there anyone who has knowledge about this problem? Any advice appreciated!

Updated:

OS : CentOS 5.6 PHP: 5.3.6

I tried /usr/local/php/sbin/php-fpm and it works! Why?

I installed PHP with its source code.

share|improve this question

migrated from stackoverflow.com Aug 13 '11 at 10:59

This question came from our site for professional and enthusiast programmers.

6  
AFAIK PHP-FPM is not a service/daemon. Why are you expecting start to work? –  Christian Aug 13 '11 at 10:07
    
What do you want to do? –  Pekka 웃 Aug 13 '11 at 10:07
    
@Christian Sciberras: it is a daemon –  zerkms Aug 13 '11 at 10:08
    
@Pekka: obviously he is trying to start php-fpm daemon ;-) –  zerkms Aug 13 '11 at 10:11
1  
@zerkms - Me the smart guy? Wasn't you the one blurting that PHP-FPM is a daemon? I simply told him start won't work with it. It was a comment, not an answer. You, on the other hand, went ahead explaining how start will magically work by putting the program name in an init script, without even explaining why. Stop being daft. –  Christian Aug 13 '11 at 13:33

2 Answers 2

The problem you have is with the command you called:

/usr/local/php/sbin/php-fpm start

The start part of it is not part of it's switches/parameters, so php-fpm gives you the usage information so you can actually look for what you tried to do, to correct your command call.

What do you wanted to do?

Are you looking how to configure your webserver to use the PHP-FPM implementation instead of FASTCGI?

share|improve this answer
1  
omg, guys, he wanted to start php-fpm daemon –  zerkms Aug 13 '11 at 10:47
    
@zerkms: Which would not work for CLI. Hence my question: "What do you wanted to do?" –  hakre Aug 13 '11 at 10:55
    
where do you see php cli? He is interacting with php-fpm –  zerkms Aug 13 '11 at 10:58
    
@zerkms: He is running the command in the shell, that is where I see CLI (Command Line Interface). –  hakre Aug 13 '11 at 11:01
1  
omg, guys, he wanted to start php-fpm daemon Me too! I just wanted to view a youtube video from my Nokia 1110i. But sadly it didn't work!!! –  Christian Aug 13 '11 at 13:42

I'm going to attempt to answer the question based on a small (but major) assumption and not commment first because it may get lost in the bickering going on in comments.

It appears as though Foredoomed may be on FreeBSD, and has installed from ports. The question is lacking this useful information. On FreeBSD, there is no init.d and ports installed using /usr/local which is a major clue based on what I've seen so far.

So with that said, try this:

Edit /etc/rc.conf as root and add php_fpm_enable=”YES” to it, then save and close.

When you're ready to run php-fpm again, you start it using the rc.d scripts. As it's an installed program, it is not in /etc/rc.d, but in /usr/local/etc/rc.d:

Run the following: /usr/local/etc/rc.d/php-fpm start

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.