Home > Article > Backend Development > php服务异常总结
php服务错误总结
服务器环境信息:
Linux version 2.6.32-279.el6.i686
CentOS release 6.3 (Final)
?
Server version: Apache/2.2.15 (Unix)
PHP 5.3.3 (cli) (built: May? 7 2012 19:58:17)
出现问题:
启动apache服务,查看PHP日志
出现如下信息
?
PHP Warning:PHP Startup:mcrypt:Unable to initiallize module
Module compiled with module API=20100525
PHP??? compiled with module API=20090626
?
错误含义:
##意思是mcrypt
模块没有初始化,其实就是没有调用成功###
问题检查
查看已经安装的PHP rpm包情况
?[root@localhost local]# rpm -qa|grep php php-intl-5.3.3-3.el6_2.8.i686 php-pear-1.9.4-4.el6.noarch php-common-5.3.3-3.el6_2.8.i686 php-mysql-5.3.3-3.el6_2.8.i686 php-bcmath-5.3.3-3.el6_2.8.i686 php-embedded-5.3.3-3.el6_2.8.i686 php-gd-5.3.3-3.el6_2.8.i686 php-mcrypt-5.4.8-1.el6.i686 php-5.3.3-3.el6_2.8.i686 php-dba-5.3.3-3.el6_2.8.i686 php-cli-5.3.3-3.el6_2.8.i686 php-xml-5.3.3-3.el6_2.8.i686 php-enchant-5.3.3-3.el6_2.8.i686 php-ldap-5.3.3-3.el6_2.8.i686 php-devel-5.3.3-3.el6_2.8.i686 php-pdo-5.3.3-3.el6_2.8.i686 php-mbstring-5.3.3-3.el6_2.8.i686
发现php-mcrypt-5.4.8-1.el6.i686版本确实与php版本不相符合
?问题解决
1 卸除php-mcrypt模块
rpm -e php-mcrypt-5.4.8-1.el6.i686
2 安装正确的版本
php-mcrypt-5.3.3-1.el6.i686
问题即可解决