Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPMyAdmin File Import Error

Tags:

phpmyadmin

I can't seem to get PHPMYADMIN to import an SQL file properly as it is giving my the 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.

The documentation says:

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.

Here's what I've done...

Changed PHP.INI params

  • upload_max_filesize = 1000M
  • memory_limit = 1500M
  • post_max_size = 1500M
  • restarted Apache

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.

Any help would be much appreciated!

like image 265
Dan Gibson Avatar asked Jan 13 '12 15:01

Dan Gibson


2 Answers

I faced this problem on Ubuntu 17, maybe because of the upgrade I've done. The problem was a not writable /var/lib/phpmyadmin/tmp so just run this code:

sudo chmod 777 /var/lib/phpmyadmin/tmp/

and then its works again.

like image 157
J.Aries Avatar answered Oct 01 '22 16:10

J.Aries


For others with this problem not solved with PHP .ini settings, look in your html form:

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

My form had a value lower than my php server settings.

like image 20
svenyonson Avatar answered Oct 01 '22 17:10

svenyonson