そこで、nginx と mysql とともに MacPorts から PHP5 FCGI をインストールしました。最後の 2 つは、システムの起動時に正常にロードされます。しかし、PHP はそうではありません。ファイルを作成し、/opt/local/etc/LaunchDaemons/org.macports.php5/org.macports.php5-cgi.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>org.macports.php5-cgi</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/php-cgi</string>
<string>-b127.0.0.1:9000</string>
<string>-q</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>PHP_FCGI_CHILDREN</key>
<string>8</string>
<key>PHP_FCGI_MAX_REQUESTS</key>
<string>256</string>
</dict>
<key>Debug</key><false/>
<key>Disabled</key><true/>
<key>KeepAlive</key><true/>
</dict>
</plist>
しかし、ロード時に起動しません。sudo launchctl load -w /opt/...
手動で開始するには実行する必要があります。