Welcome! Log In Create A New Profile

Advanced

CentOS /etc/init.d/phpfcgi Bug

Posted by ghadamyari 
CentOS /etc/init.d/phpfcgi Bug
January 26, 2010 12:38PM
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
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 113
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready