Hi there,
I found that [u][url=http://wiki.nginx.org/RedHatPHPFCGIInitScript]this tutorial[/url][/u] has a bug and does not work on CentOS.
I changed this line :
[code]
daemon --user $PHPUSER --pidfile $PIDFILE "env - $E $PHPFCGI -q -b $FCGIADDR:$FCGIPORT &> /dev/null &"
[/code]
to
[code]
echo daemon --user $PHPUSER --pidfile $PIDFILE "env - $E $PHPFCGI -q -b $FCGIADDR:$FCGIPORT &> /dev/null &"
[/code]
And it is the result :
[code]
Starting service:daemon --user php --pidfile /var/run/phpfcgi.pid env - PATH=/sbin:/usr/sbin:/bin:/usr/bin [b]USER=[/b] PHP_FCGI_CHILDREN=5 PHP_FCGI_MAX_REQUESTS=1000 FCGI_WEB_SERVER_ADDRS= /usr/bin/php-cgi -q -b 127.0.0.1:8888 &> /dev/null &
[/code]
Then tried to change any [b]PHPUSER[/b] to [b]USER[/b] and I get this output :
[code]
Starting service:daemon --user php --pidfile /var/run/phpfcgi.pid env - PATH=/sbin:/usr/sbin:/bin:/usr/bin USER=php PHP_FCGI_CHILDREN=5 PHP_FCGI_MAX_REQUESTS=1000 FCGI_WEB_SERVER_ADDRS= /usr/bin/php-cgi -q -b 127.0.0.1:8888 &> /dev/null &
[/code]
This looks to be correct but do not work at all.
When I change it to this one :
[code]
echo daemon $PHPFCGI -q -b $FCGIADDR:$FCGIPORT &> /dev/null &
[/code]
It works very well for me.
Please fix it or give a better solution.
I am using CentOS v5.4