Splashlin Splashlin - 8 months ago 64
PHP Question

PHP-FPM Stop/Reload Issues on Mac Lion (OSX 10.7)

I'm setting up php-fpm on my machine and I installed it using homebrew (specifically homebrew-alt). Everything installed fine and if I open up the terminal and type the command "php-fpm" it starts up fine. Unfortunately if I try to run any commands such as "php-fpm stop" I get the message below. Does anyone have any idea what may be causing this or how I could get it working? If I try killing the process with the kill command it just seems to automatically restart itself.

Usage: php [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p <prefix>] [-g <pid>] [-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/Cellar/php/5.3.8).
-g, --pid <file>
Specify the PID file location.
-y, --fpm-config <file>
Specify alternative path to FastCGI process manager config file.
-t, --test Test FPM configuration and exit


Alternatively, using the USR2 signal makes php-fpm reload its configuration file:

kill -USR2 `cat /usr/local/var/run/php-fpm.pid`