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,问题得到解决。
[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,问题得到解决。
相关推荐
Noneyes 2020-11-10
zyyjay 2020-11-09
xuebingnan 2020-11-05
samtrue 2020-11-22
stefan0 2020-11-22
yifangs 2020-10-13
songshijiazuaa 2020-09-24
hebiwtc 2020-09-18
天步 2020-09-17
83911535 2020-11-13
whatsyourname 2020-11-13
zhouyuqi 2020-11-10
mathchao 2020-10-28
王志龙 2020-10-28
wwwsurfphpseocom 2020-10-28
diskingchuan 2020-10-23
savorTheFlavor 2020-10-23