PHPMyAdmin File Import Error

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!

Best Answer

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

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

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.

Related Topic