2012-01-13 67 views
9

我似乎无法得到phpMyAdmin来,因为它给我的错误正确导入SQL文件:的phpMyAdmin文件导入错误

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.

文档说:

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 = 1000M
  • memory_limit的= 1500M
  • 的post_max_size = 1500M
  • 重新启动Apache的

我在希望也许我将它们设置得太高也尝试过不同的限制变量...但那并不重要。 PHPMYADMIN确认(在导入页面)上传变量设置为“(最大:1,000MiB)”,但仍然不好。我只是试图上传一个5MB大小的文件。

任何帮助将不胜感激!

+0

Apache错误日志说什么,如果有的话?您是否使用SSL客户端证书? – Basic 2012-02-09 14:46:10

+0

我知道这不是一个真正的答案,但有权访问命令行界面?如果您有权访问,您可以使用它来导入文件。 – 2012-04-10 13:39:17

+0

您是否尝试压缩文件并将其上传? – 2012-12-24 09:19:24

回答

15

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

php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp

确认这是通过运行Apache,并提供免费空间的用户可写。

在我的情况下,在我的开发机器上,我运行apache作为我自己的用户而不是普通的www-data或apache用户。该tmp目录不能由我的用户写入。

1

对于其他人来说这个问题不是PHP的.ini设置解决了,看在你的HTML表单:

<input type="hidden" name="MAX_FILE_SIZE" value="5000000" /> 

我的形式有比我的PHP服务器设置较低的值。

0

我在Ubuntu 17上遇到了这个问题,可能是因为我升级了。这个问题是一个不可写的/ var/lib中/ phpMyAdmin的/ tmp目录因此只要运行该代码:777的/ var/lib中/ phpMyAdmin的/ tmp目录/

,然后再其作品

sudo的文件模式。