phpmyadmin“没有收到要导入的数据";错误,如何解决? [英] phpmyadmin "no data received to import" error, how to fix?

查看:26
本文介绍了phpmyadmin“没有收到要导入的数据";错误,如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一台电脑上使用 XAMPP 来托管一个数据库.我使用 phpmybackuppro 导出了一个备份(bintra.sql").我在家里的 mac 上使用 xampp,当我尝试导入桌面上的 sql 文件时,我收到了这个错误.

I am using XAMPP on a pc atwork to host a database. I exported a backup ("bintra.sql") using phpmybackuppro. I use xampp on a mac at home, and when I try to import the sql file located on my desktop, I get this error.

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.

现在,bintra.sql 的文件大小为 922kb.phpmyadmin 屏幕上显示的最大允许大小是 3,072KiB,所以我认为这不是阻止导入的大小.

Now, the file size of bintra.sql is 922kb. The max size allowed indicated on the phpmyadmin screen is 3,072KiB, so I don't think it is the size that is preventing the import.

我正在使用 phpmyadmin v2.11.7

I'm using phpmyadmin v2.11.7

有没有人知道为什么没有收到要导入的数据?

Does anyone have any ideas why no data is being received to import?

评论回复:

这些是我从 php.ini 上传的设置

These are my upload settings from php.ini

;Whether to allow HTTP file uploads.
file_uploads = On
;Temporary directory for HTTP uploaded files (will use system default if not specified). 
//upload_tmp_dir =
;Maximum allowed size for uploaded
files. 

upload_max_filesize = 3M
;Maximum size of POST data that PHP will accept.
post_max_size = 8M

尝试改用 Mamp.使用相同的 sql 文件可以正常工作.我不知道为什么.

Tried using Mamp instead. Works fine with the same sql file. I don't know why.

推荐答案

我在 Windows 上遇到了同样的问题.原来这是由 PHP 用于上传的临时目录引起的.默认为 C:WindowsTemp,PHP 不可写.

I had the same problem on Windows. Turns out it was caused by the temporary directory PHP uses for uploads. By default this is C:WindowsTemp, which is not writable for PHP.

在php.ini中,添加:

In php.ini, add:

upload_tmp_dir = C:inetpub	emp

确保删除任何其他 upload_tmp_dir 设置.在 C:inetpub emp 上设置权限,以便 IUSRIIS_IUSRS 具有写入权限.重启网络服务器就可以了.

Make sure to remove any other upload_tmp_dir settings. Set permissions on C:inetpub emp so IUSR and IIS_IUSRS have write permission. Restart the web server and you should be fine.

这篇关于phpmyadmin“没有收到要导入的数据";错误,如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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