PHP init script to go with nginx?
Phillip B Oldham
phill at theactivitypeople.co.uk
Fri Jun 13 16:21:30 MSD 2008
Yep, I did all that - still got that message.
Thanks for the script though. I'm currently mashing bits together from
your script, the one which starts nginx, and a few other bits. Once its
running I'll drop it onto the mailing list for prosperity. ;)
Volodymyr Kostyrko wrote:
> Phillip B Oldham wrote:
>> Also, I think there may be a bug with the original script
>>> Linux:
>>>
>>> #!/bin/ash
>>> #
>>> # chkconfig: 234 25 75
>>> # description: php FastCGI daemon
>>>
>>> case $1 in
>>> restart)
>>> /etc/init.d/phpFcgid stop
>>> /etc/init.d/phpFcgid start
>>> ;;
>>> start)
>>> users="www"
>>> www_childs='2'
>>> for user in ${users}; do
>>> socketdir="/tmp/.fastcgi.${user}"
>>> mkdir -p ${socketdir}
>>> chown ${user}:nobody ${socketdir}
>>> chmod 0750 ${socketdir}
>>> eval export PHP_FCGI_CHILDREN=\${${user}_childs}
>>> su -m ${user} -c "/opt/php5/bin/php-cgi -b
>>> ${socketdir}/socket&"
>>> done
>>> ;;
>>> stop) /usr/bin/pkill php-cgi ;;
>>> esac
>> On my CentOS box, service phpFcgid start returns the following:
>> env: /etc/init.d/phpFcgid: No such file or directory
>
> This script is actually the contents of /etc/init.d/phpFcgid. To start
> using it you should put it there, make it runnable and register it
> with chkconfig. You should also have php installed with FastCgi
> support and you can build it alone as I do, just in my case php is
> installed with prefix /opt/php5.
>
--
*Phillip B Oldham*
The Activity People
phill at theactivitypeople.co.uk <mailto:phill at theactivitypeople.co.uk>
------------------------------------------------------------------------
*Policies*
This e-mail and its attachments are intended for the above named
recipient(s) only and may be confidential. If they have come to you in
error, please reply to this e-mail and highlight the error. No action
should be taken regarding content, nor must you copy or show them to anyone.
This e-mail has been created in the knowledge that Internet e-mail is
not a 100% secure communications medium, and we have taken steps to
ensure that this e-mail and attachments are free from any virus. We must
advise that in keeping with good computing practice the recipient should
ensure they are completely virus free, and that you understand and
observe the lack of security when e-mailing us.
------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phill.vcf
Type: text/x-vcard
Size: 261 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx/attachments/20080613/8947ce0d/attachment.vcf>
More information about the nginx
mailing list