解决因为centos PHP版本过旧升级,造成的eAccelerator错误
Posted on 二月 16th, 2011 in apache、php、mysql | No Comments »
我的Centos的版本是5.5,PHP版本是5.1.6,无法安装phpcms v9版本,于是决定升级php到5.2。可是Centos默认的源里没有比5.1.6更高版本的PHP,于是通过如下处理升级PHP:
#gedit /etc/yum.repos.d/CentOS-testing.repo
其中内容:
# CentOS-Testing:
# !!!! CAUTION !!!!
# This repository is a proving grounds for packages on their way to CentOSPlus and CentOS Extras.
# They may or may not replace core CentOS packages, and are not guaranteed to function properly.
# These packages build and install, but are waiting for feedback from testers as to
# functionality and stability. Packages in this repository will come and go during the
# development period, so it should not be left enabled or used on production systems without due
# consideration.
[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
includepkgs=php*
然后在执行:
#yum update php
升级完毕,运行:
#php -v
出现如下错误:
PHP Warning: PHP Startup: eAccelerator: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknow on line 0
重新安装 eAccelerator即可解决,安装方法:CentOS 5.1下安装eAccelerator