PHPMyAdmin文件导入错误 [英] PHPMyAdmin File Import Error

查看:129
本文介绍了PHPMyAdmin文件导入错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法使PHPMYADMIN正确导入SQL文件,因为它给了我错误:

I can't seem to get PHPMYADMIN to import an SQL file properly as it is giving my the error:

未接收到要导入的数据.没有提交文件名,或者文件大小超出了PHP允许的最大大小 配置.请参阅常见问题解答1.16.

No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.

文档说:

首先要检查(或要求您的主机提供商进行检查)的是 档案中的upload_max_filesize,memory_limit和post_max_size的值 php.ini配置文件.所有这三个设置都限制了 PHP可以提交和处理的最大数据大小.一 用户还说post_max_size和memory_limit需要更大 而不是upload_max_filesize.

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参数

Changed PHP.INI params

  • upload_max_filesize = 1000M
  • memory_limit = 1500M
  • post_max_size = 1500M
  • 重新启动Apache

我也尝试了不同的极限变量,希望可能是我将它们设置得太高了……但这没关系. PHPMYADMIN确认(在导入页面上)上载变量设置为(Max:1,000MiB)",但仍然不好.我仅尝试上传大小为5MB的文件.

I also tried different limit variables in hopes that maybe I was setting them too high... but that didn't matter. PHPMYADMIN confirms (on the import page) that the upload variable is set to "(Max: 1,000MiB)" but still no good. I am only trying to upload a file that is 5MB in size.

任何帮助将不胜感激!

推荐答案

我刚刚在自己的开发机上解决了这个问题.在/etc/phpmyadmin/apache.conf中,您可以看到phpmyadmin尝试在哪里存储临时文件,例如:

I've just fixed this on my own dev machine. In /etc/phpmyadmin/apache.conf you can see where phpmyadmin is trying to store temp files, e.g.:

php_admin_value upload_tmp_dir/var/lib/phpmyadmin/tmp

php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp

请确保apache运行时用户具有可写性并具有可用空间.

Make sure this is writable by the user that apache runs as and has free space.

在我的开发机上,我以自己的用户身份运行apache,而不是普通的www-data或apache用户.我的用户无法写入该tmp目录.

In my case, on my dev machine, I run apache as my own user rather than the normal www-data or apache user. That tmp dir wasn't writable by my user.

这篇关于PHPMyAdmin文件导入错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆