phpmyadmin提示“无法载入mcrypt扩展”的解决办法

一般在安装PHP时都很少启用 mcrypt 扩展,所以在使用 phpmyadmin 时会提法“无法载入mcrypt扩展”的信息,解决的办法:

1、打开php的配置文件“php.ini”文件
找到 “;extension=php_mcrypt.dll”和找到“;extension=php_mbstring.dll”,去掉前面的分号“;"”,把前面的分号去掉。

要是不行就多开启一些扩展dll文件,如:

extension=php_bz2.dll
extension=php_curl.dll
extension=php_dba.dll
extension=php_dbase.dll
extension=php_exif.dll
extension=php_fdf.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
;extension=php_ifx.dll
extension=php_imap.dll
extension=php_interbase.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_mcrypt.dll
extension=php_mhash.dll
extension=php_mime_magic.dll
extension=php_ming.dll
extension=php_msql.dll
extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_oci8.dll
extension=php_openssl.dll
extension=php_pdo.dll
extension=php_pdo_firebird.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
extension=php_pspell.dll
extension=php_shmop.dll
extension=php_snmp.dll
extension=php_soap.dll
extension=php_sockets.dll
extension=php_sqlite.dll
;extension=php_sybase_ct.dll
extension=php_tidy.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
extension=php_zip.dll

2、重启 apache 或者 IIS 即可

如果还不行,就在 PHP 的安装目录下面找到 libmcrypt.dll ,把它复制到“C:\windows\system32”面,再重启

phpmyadmin导入(import)超过2M的数据库文件

在用phpmyadmin备份mysql数据库时,没有分段大小,一下子备份了一百多M的sql数据;在导入的时候,提示超过2M导入限制,前一段时间,遇到过一次,后来利用网站后台的自动分段处理了;这次又遇到这个问题,决心解决一下。

到网上搜索了一下前人的解决办法,大多数都说修改php.ini中的upload_max_filesize,但修改了这个以后,还是提示这个问题;但phpmyadmin在提示这个问题的时候,右下角有一行英文提示,大致意思是说,解决这个问题,可以参考phpmyadmin文档;直接点击这个链接,phpmyadmin自动查找到了以下说明:

[1.16] I cannot upload big dump files (memory, http or timeout problems).
Starting with version 2.7.0, the import engine has been re–written and these problems should not occur. If possible, upgrade your phpMyAdmin to the latest version to take advantage of the new import features.

The first things to check (or ask your host provider to check) are the values of upload_max_filesize, memory_limit and post_max_size in the php.ini configuration file. All of these three settings limit the maximum size of data that can be submitted and handled by PHP. One user also said that post_max_size and memory_limit need to be larger than upload_max_filesize.

以上文件大致说明的意思就是说,遇到导入过大文件时,首先检查php.ini 配置文件中的以下三个地方:

upload_max_filesize
memory_limit
post_max_size

并且推荐修改的值要稍大于导入的sql数据库文件

依照这个提示,修改了以上三个在php.ini中的值以后,然后重启php环境

再次导入时,虽然phpmyadmin还是显示导入最大限制:20,480 KB
但巨大的数据库文件已经被成功的导入了

phpMyAdmin的版本为 2.8.1,环境:APMServ 5.1.2