I'm trying to increase the upload_max_filesize etc in order to import bigger files with PHPMyadmin.

I have changed the php.ini and restart Apache. I can see the changes on the PHPMyadmin import screen (mentioned there Max: 300MiB) but when i try to import a 50 M file i'm getting the alert:

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.

Any idea how it can be: In 1 hand it seems the changes took affect but in the other hand it doesn't work...

Thank you very much.


The solution copy from link

If you have your own Ubuntu server running you may encounter the maximal file size upload limit in php scripts which is set to 2Mb as default. In order to change that we first have a look what the size actually is. In /var/www (standard www directory) create a file called info.php with the following content:

// Show all information, defaults to INFO_ALL

Then browse to this file via localhost/info.php (replace localhost with the servername if necessary) and look for the line

upload_max_filesize 2M 2M

which will show you the actual maximum file size. In order to change that open a ssh connection to your server and edit the file /etc/php5/apache2/php.ini with

sudo nano /etc/php5/apache2/php.ini

search for “upload_max_filesize” with Ctrl-W and change “2M” to “20M”. Save the file with Ctrl-O and exit with Ctrl-X. Restart the apache server with

sudo /etc/init.d/apache2 restart

and visit again localhost/info.php to check if the maximum file size was changed.

  • 2
    for php 7.2 I had to do this sudo nano /etc/php5/apache2/php.ini – Junaid Jan 22 '19 at 8:13
  • Find the correct php.ini file in the output of phpinfo(). – Flimm Sep 4 '20 at 15:09
  • Don't just restart apache, also restart fpm, like this: sudo service php7.4-fpm restart – Flimm Sep 4 '20 at 15:19

This was my solution: https://stackoverflow.com/questions/8853301/phpmyadmin-file-import-error

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.

  • how do i give this folder permissions – Aryeh Armon Jul 7 '15 at 6:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.