Starting php-cgi at boot on mac os x 10.6.8
Posted
by
nikhil
on Server Fault
See other posts from Server Fault
or by nikhil
Published on 2012-06-17T14:41:41Z
Indexed on
2012/06/17
15:17 UTC
Read the original article
Hit count: 330
I'm new to mac os, I have installed and configured nginx with php-fastcgi. I need to run this command in a terminal and keep that terminal open to access php files from my browser.
php-cgi -b 127.0.0.1:9000 -q
Here's the plist that I wrote by looking up sources on the internet
<?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>Debug</key>
<false/>
<key>EnvironmentVariables</key>
<dict>
<key>PHP_FCGI_CHILDREN</key>
<string>2</string>
<key>PHP_FCGI_MAX_REQUESTS</key>
<string>1000</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>UserName</key>
<string>nikhil</string>
<key>Label</key>
<string>php-fastcgi</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/php-cgi</string>
<string>-b 127.0.0.1:9000</string>
<string>-q</string>
</array>
</dict>
</plist>
I'm loading it using launchctl load -w ~/Library/LaunchAgents/php-fastcgi.plist
without any success, can anyone tell me how this can be done.
© Server Fault or respective owner