主机头

标题: fcgi.start执行错误的解决办法 [打印本页]

作者: admin    时间: 2013-4-5 00:07
标题: fcgi.start执行错误的解决办法
fcgi.start执行错误。平时没问题。但是现在不行。解决办法?

执行 fcgi.start

出现

PHP-CGI starting...
/bin/fcgi.start: line 11: spawn-fcgi: command not found
DONE.


fcgi.start 脚本代码如下
  1. #!/bin/sh
  2. SPAWN=spawn-fcgi
  3. PHP=/usr/bin/php-cgi
  4. #PHP=/usr/local/php/bin/php-cgi
  5. PORT=9000
  6. PID=/var/run/fcgi.pid
  7. ADDR=0.0.0.0

  8. if [ -x ${PHP} ]; then
  9.     echo PHP-CGI starting...
  10.     ${SPAWN} -C 5 -f ${PHP} -a ${ADDR} -p ${PORT} -P ${PID}   
  11.     echo DONE.
  12. else
  13.     echo Can not execute ${PHP}
  14. fi
复制代码
---------------------------------------------------------------------------------------
执行 fcgi.shutdown

出现以下 提示
cat: /var/run/fcgi.pid: No such file or directory
PHP-CGI shutdown...
usage: kill [ -s signal | -p ] [ -a ] pid ...
       kill -l [ signal ]
DONE.


fcgi.shutdown文件源码
  1. #!/bin/sh
  2. SPAWN=spawn-fcgi
  3. PHP=/usr/bin/php-cgi
  4. PORT=9000
  5. #PHP=/usr/local/php/bin/php-cgi
  6. PID=/var/run/fcgi.pid
  7. ADDR=0.0.0.0

  8. if [ -x ${PHP} ]; then
  9.     echo PHP-CGI shutdown...`cat ${PID}`
  10.      ps aux | grep ${PHP} | grep -v grep | awk '{print $2}' | xargs kill -9   
  11.     echo DONE.
  12. else
  13.     echo Can not found ${PID}
  14. fi
复制代码
这2个脚本一直用着都没事去,今天装却不行.......................





欢迎光临 主机头 (http://zhujitou.com/) Powered by Discuz! X2.5