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'm trying to start php-fpm with launchctl.

Running directly from the command line is no problem:

$ /usr/sbin/php-fpm -p /Users/dmitry -e

Here's the contents of /Users/dmitry/Library/LaunchAgents/dminkovsky.php-fpm.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>dminkovsky.php-fpm</string>
    <key>ProgramArguments</key>
    <array>
      <string>/usr/sbin/php-fpm</string>
      <string>-p</string>
      <string>/Users/dmitry/var</string>
      <string>-e</string>
    </array>
    <key>EnableGlobbing</key>
    <true/>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
  </dict>
</plist>

For some reason the process doesn't start with this .plist. Nothing is logged, either, so I don't know why. In /var/log/system.log, I have:

Nov 18 08:38:30 airosol com.apple.launchd.peruser.503[285] (dminkovsky.php-fpm[19833]): Exited with code: 78
Nov 18 08:38:30 airosol com.apple.launchd.peruser.503[285] (dminkovsky.php-fpm): Throttling respawn: Will start in 10 seconds

I don't know where to take it from here though.

Most oddly, this .plist used to work before upgrading to Mavericks.

Thank you!

share|improve this question

1 Answer 1

php-fpm's error code 78 seems to correspond to EX_CONFIG (see one of the messages here), indicating some sort of configuration error. It's possible the error is preventing php-fpm from using any of your configured settings, including logging settings. You may be able to get more information by capturing the stdin and stdout from the php-fpm process by adding something like this to your .plist:

<key>StandardOutPath</key>
<string>/var/log/php-fhm-out.log</string>
<key> StandardErrorPath</key>
<string>/var/log/php-fhm-err.log</string>
share|improve this answer
    
Thanks for the tip, but unfortunately neither output redirect yielded results written to file upon attempting to load/start. –  dimadima Nov 18 '13 at 16:10

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.