phpmyadmin导入(import)文件限制的解决办法

yipeiwu_com6年前PHP代码库
到网上搜索了一下前人的解决办法,大多数都说修改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,但巨大的80M数据库文件已经被成功的导入了。

相关文章

PHP错误Cannot use object of type stdClass as array in错误的解决办法

很多人在PHP输出一个二维数组的时候出现“Fatal error: Cannot use object of type stdClass as array in……”。解决办法分析如下:...

php 去除html标记--strip_tags与htmlspecialchars的区别详解

strip_tags   去掉 HTML 及 PHP 的标记。  语法: string strip_tags(string str);  传回值: 字串  函式种类: 资料处理  内容说...

PHP MVC模式在网站架构中的实现分析

PHP MVC模式在网站架构中的实现分析

视图(View) “视图”主要指我们送到Web浏览器的最终结果??比如我们的脚本生成的HTML。当说到视图时,很多人想到的是模版,但是把模板方案叫做视图的正确性是值得怀疑的。 对视图来说...

关于PHP文件的自动运行方法分析

本文实例分析了PHP文件的自动运行方法。分享给大家供大家参考,具体如下: 这里分析两种方法: 第一种方法: a.php文件内容 如下: <?php ini_set(...

php程序效率优化的一些策略小结

1.在可以用file_get_contents替代file、fopen、feof、fgets等系列方法的情况下,尽量用 file_get_contents,因为他的效率高得多!但是要注意...