php版本是:5.5.5
linux版本:Linux yyl-cms1 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
安装mcrypt最简单的方法是 yum install php-mcrypt
安装之后,在/usr/lib64/php/modules/目录下生成mcrypt.so文件
运行php -v 检查是否可以加载mcrypt模块
提示:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/module.so' - /usr/lib64/php/modules/module.so: cannot open shared object file: No such file or directory in Unknown on line 0
; Enable mcrypt extension module
解决方法:
编辑/etc/php.d/mcrypt.ini
将 extension=module.so 改为 extension=mcrypt.so
重启php
/etc/init.d/php-fpm restart