phpMyAdmin的mcrypt错误

错误提示:无法载入mcrypt扩展可能情况1);extension=php_mcrypt.dll改成extension=php_mcrypt.dll //去掉前面的;使之生效[root@ www.linuxidc.com ~]# updatedb  #更新数据库
[root@ www.linuxidc.com ~]# locate php.ini  #查找文件
/usr/local/php/php.ini
/usr/local/php/php.ini.default
/usr/src/php-5.2.16/php.ini-dist
/usr/src/php-5.2.16/php.ini-recommended
/usr/src/php-5.3.4/php.ini-development
/usr/src/php-5.3.4/php.ini-production
[root@ www.linuxidc.com ~]#vi /usr/local/php/php.ini.default #查看备份档并找到一下字段
 ;extension=php_mcrypt.dll
 复制至php.ini文件中,启动这个功能
 default_socket_timeout = 60
extension=php_mcrypt.dll
[Date]
问题仍然存在
 
查看apache的错误日志
 [root@ www.linuxidc.com ~]# grep mcrypt /usr/local/apache/logs/error_log
 
PHP Warning: PHP Startup: Unable to load dynamic library './php_mcrypt.dll' - ./php_mcrypt.dll: cannot open shared object file: No such file or directory in Unknown on line 0
 
下载安装libmcrypt组件
[root@ www.linuxidc.com ftpuser1]# cd /usr/src/
[root@ www.linuxidc.com src]# ls lib*
libmcrypt-2.5.7.tar.gz
[root@ www.linuxidc.com src]# tar -xzvf libmcrypt-2.5.7.tar.gz
 
[root@ www.linuxidc.com libmcrypt-2.5.7]# mkdir /usr/local/libmcrypt
[root@ www.linuxidc.com libmcrypt-2.5.7]# ./configure --prefix=/usr/local/libmcrypt/
[root@ www.linuxidc.com libmcrypt-2.5.7]# make && make install
 
 
 重新编译php
[root@ www.linuxidc.com php-5.2.16]# ./configure --prefix=/usr/local/php --enable-mbstring --with-config-file-path=/usr/local/php     --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mcrypt=/usr/local/libmcrypt/
 
 
[root@ www.linuxidc.com php-5.2.16]# ls php*
php5.spec php5.spec.in php.gif php.ini-dist php.ini-recommended
[root@ www.linuxidc.com php-5.2.16]# cp php.ini-recommended /usr/local/php/php.ini #创建php配置文件
 
extension=php_mcrypt.dll
 
[root@ www.linuxidc.com php]# cp php.ini php.ini.bak #对配置文档进行备份
[root@ www.linuxidc.com php]# rm -rf php.ini
[root@ www.linuxidc.com php]# grep -v ';' php.ini.bak > php.ini #删除 旧的配置文档,并创建新的配置文档
[root@ www.linuxidc.com php]#
 
重启apache,问题得到解决。

相关推荐