知者无忧

NOThing Is Impossible! —— 原创文章,谢绝转载!

RSS Feed

解决PHP的FCGI的254错误

0 Comments
Posted by ZZQ on 2010-01-17 at 13:19

昨天登陆VPS,看到ubuntu有几个安全更新,就upgrade了一把,结果fast-cgi的进程就无法启动了,具体症状为:

运行“/usr/bin/spawn-fcgi 参数省略……”,出现错误:

spawn-fcgi: child exited with: 254

检查“php -v”,没有发现问题。

检查“php-cgi -v”,报错:

# php-cgi -v

PHP Warning:  [eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.2.10-2ubuntu6.3. Rebuild it for your PHP version (5.2.10-2ubuntu6.4) or download precompiled binaries.

in Unknown on line 0

PHP Fatal error:  Unable to start eAccelerator module in Unknown on line 0

原来是升级之后,eAccelerator版本不符合了,需要重新编译安装。

于是下载eAccelerator最新版,重新安装之:

#tar -zxvf ./eaccelerator-0.9.5.tar.bz2
#cd eaccelerator-0.9.5
#export PHP_PREFIX="/usr/local" (把PHP安装目录导入到环境变量,FreeBSD默认是/usr/local)
#$PHP_PREFIX/bin/phpize
#./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
#make
#make install

以前已有的php设置无需改动。(如果你是第一次安装eaccelerator,请参考其安装说明进行设置)

重新启动spawn-fcgi,恢复正常了。

相关日志

  • 暂无相关日志

Filed under 未分类
Tagged as ,
You can leave a comment, or trackback from your own site.

0 Comments

You can be the first to comment!

发表评论

您的电子邮箱不会被公开。 标记为 * 的区域必须填写

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

功能

  • 登录
  • 日志 RSS
  • 评论 RSS
  • 中国博客网