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

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

问题描述

我在工作中的PC上使用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:\ Windows \ Temp,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:\Windows\Temp, which is not writable for PHP.

在php.ini中,添加:

In php.ini, add:

upload_tmp_dir = C:\inetpub\temp

请确保删除任何其他upload_tmp_dir设置.在C:\inetpub\temp上设置权限,以便IUSRIIS_IUSRS具有写权限.重新启动Web服务器,您应该没事.

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

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

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