Skip to content

Instantly share code, notes, and snippets.

@BrianGilbert
Created January 25, 2012 23:22
Show Gist options
  • Save BrianGilbert/1679625 to your computer and use it in GitHub Desktop.
Save BrianGilbert/1679625 to your computer and use it in GitHub Desktop.
php issue with install
>>>> Create symbolic link for it in /usr/local/etc/
[localhost] sudo: ln -s /usr/local/Cellar/php/5.3.9/etc/php-fpm.conf /usr/local/etc/php-fpm.conf
>>>> Edit the conf file
$ nano /usr/local/etc/php-fpm.conf
Add the following line below ;pid = run/php-fpm.pid
pid = /usr/local/var/run/php-fpm.pid
Update the user and group section as follows
user = _www
group = _www
Remove the ; from the start of the following lines then save using Ctrl+X then Y
pm.start_servers = 3
pm.min_spare_servers = 3
pm.max_spare_servers = 5
pm.max_requests = 500
[localhost] sudo: sed -i.bak -E -e 's/^(pid =.*)/;\1/g' /usr/local/etc/php-fpm.conf
[localhost] sudo: sed -i.bak -E -e 's/^(user =.*)/;\1/g' /usr/local/etc/php-fpm.conf
[localhost] sudo: sed -i.bak -E -e 's/^(group =.*)/;\1/g' /usr/local/etc/php-fpm.conf
[localhost] sudo: sed -i.bak -E -e 's/^(pm.start_servers =.*)/;\1/g' /usr/local/etc/php-fpm.conf
[localhost] sudo: sed -i.bak -E -e 's/^(pm.min_spare_servers =.*)/;\1/g' /usr/local/etc/php-fpm.conf
[localhost] sudo: sed -i.bak -E -e 's/^(pm.max_spare_servers =.*)/;\1/g' /usr/local/etc/php-fpm.conf
[localhost] sudo: sed -i.bak -E -e 's/^(pm.max_requests =.*)/;\1/g' /usr/local/etc/php-fpm.conf
[localhost] sudo: echo "pid = /usr/local/var/run/php-fpm.pid" >> /usr/local/etc/php-fpm.conf
[localhost] sudo: echo "user = _www" >> /usr/local/etc/php-fpm.conf
[localhost] sudo: echo "group = _www" >> /usr/local/etc/php-fpm.conf
[localhost] sudo: echo "pm.start_servers = 3" >> /usr/local/etc/php-fpm.conf
[localhost] sudo: echo "pm.min_spare_servers = 3" >> /usr/local/etc/php-fpm.conf
[localhost] sudo: echo "pm.max_spare_servers = 5" >> /usr/local/etc/php-fpm.conf
[localhost] sudo: echo "pm.max_requests = 500" >> /usr/local/etc/php-fpm.conf
>>>> Create directory and file for php-fpm log
[localhost] sudo: mkdir /usr/local/Cellar/php/5.3.9/var/log/
[localhost] sudo: touch /usr/local/Cellar/php/5.3.9/var/log/php-fpm.log
>>>> Make our log file visible in Console app
[localhost] sudo: ln -s /usr/local/Cellar/php/5.3.9/var/log/php-fpm.log /var/log/nginx/php-fpm.log
[localhost] out: ln: /var/log/nginx/php-fpm.log: No such file or directory
Fatal error: sudo() encountered an error (return code 1) while executing 'ln -s /usr/local/Cellar/php/5.3.9/var/log/php-fpm.log /var/log/nginx/php-fpm.log'
Aborting.
Disconnecting from localhost... done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment