0 0 Votes

phpMyAdmin: Increase File Size Limit for Import

Question by Guest | 25/12/2017 at 19:59

I want to import a quite large SQL file into my database via phpMyAdmin. However, on the import tab of phpMyAdmin, where you can select a file to upload, it is stated: Max 2.048KiB. If I nevertheless upload my file ignoring that hint, I get the error message: You probably tried to upload a file that is too large.

This story concerns my local XAMPP installation, the maximum file size on my webspace is much higher. How can I raise this limit? I could not find any option in the settings of phpMyAdmin.

ReplyPositiveNegative

Stefan Trost

Show Profile | Message
Avatar
0Best Answer
2 Votes

You can not change the maximum file size in the phpMyAdmin settings, because the values ​​are taken directly from your PHP configuration.

If you open your php.ini (it can be found in the folder C:\xampp\php when using the default installation of XAMPP), a limit may result from the following settings:

upload_max_filesize=2M
post_max_size=8M
memory_limit=128M
max_execution_time=30

Your upload_max_filesize is probably set to 2 MB, that is why you get that limit. If you increase this value, you should also increase post_max_size and memory_limit, otherwise those variables will create the next limit. The memory_limit should always be bigger than post_max_size and upload_max_filesize should be larger than post_max_size. If you expect the upload to take more than 30 seconds, you must also set the max_execution_time from 30 to a higher value. So for example:

upload_max_filesize=100M
post_max_size=150M
memory_limit=250M
max_execution_time=60

With those settings, you can upload files of 100 MB and you are giving the server one minute (60 seconds) for the upload process. With that settings, phpMyAdmin should show "Max: 100MiB".

Important: You have to restart the server, to get the new values ​​applied!
26/12/2017 at 10:39

ReplyPositive Negative
Reply

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own articles on askingbox.com. How to do.