Increase the import “file size” in phpMyadmin
Posted on: October 3, 2007
- In: Apache
- 46 Comments
if you are using WAMP, you may notice that your phpMyadmin allows you to import only 2mb file size. well yesterday i had to import a file which was greater than the limit. my project database size was 6mb so i had to split the whole file in three. that was time consuming and annoying ! so i edited some stuff in phpMyadmin libraries! this is very simple. you just have to find the right file and increase the size limit..
so if you want to increase the size limit of import file then follow this ………….
go here first www\phpmyadmin\libraries
now find the file name “common.lib.php” and open it ……
goto line # 183
you will see something like below ….
$scan['MB'] = 1048576;
$scan['Mb'] = 1048576;
$scan['M'] = 1048576;
$scan['m'] = 1048576;
$scan['KB'] = 1024;
$scan['Kb'] = 1024;
$scan['K'] = 1024;
$scan['k'] = 1024;
just increase the size of’ all ‘M’ . now run your phpMyadmin again and see the change .:)
Update: @All : please don’t follow this original post as this is not the actual (indeed stupid) way to solve this problem, Please follow all the comments in this post that have the solution of this problem. Thanks.
46 Responses to "Increase the import “file size” in phpMyadmin"
Hey, I am using WAMP. I found the common.lib.php file in phpmyadmin\libraries folder but I couldn’t find the specified coding. There isn’t even specification of file size limit anywhere on this file. I tried to find in common.inc.php but even there I couldn’t find anything related to this.
So can you tell me where should I look into?
Please mail me if you can help me out.
Thank You Very Much
- Mittal Patel
http://www.MittalPatel.co.in
http://www.share-ebooks.com
I have to disagree a bit on the solution. I just tried it out, but actually the maximum upload file size is read from php.ini or if it is not available there it is set to 5MB.
So if you wanna change the limit from 2MB to a greater value, make the change in PHP.INI, look for
upload_max_filesize = 2M (default) change this to what you want!
Cheers.
Joro Stoimenov
I have Tried Both.
Both are Not Working Unfortubately,
is there any better option?
post_max_size increase this too
you need to restart the server after the change
I agree with Joro Stoimenov. If you wanna change the limit from 2MB to a greater value, make the change in PHP.INI. But this maximun until 8M.
How if I want to 20 MB ?
Thank,
Asev Wyd
i’ve tried both of them but not working…
i will try sqlyog
thnks
The first and only things to check (or ask your host provider to check) are the values of upload_max_filesize (Default 2M)
memory_limit (Default 16M)
and post_max_size (Default 8M)
in the php.ini
increase all as per your need
This will work for sure
Hi Joro Stoimenov,
Kool man nice idea, keep it up
Jeet
The method from Mahesh Mahajan works.
Thanks Mahesh and all!
i am unable t find those lines in my wamp, any buddy will help me
I have used XAMPP for WAMP environment. in my case php.ini is located in C:\xampp\php\php.ini
i’ve tried but not working
was very helpful for me,too. Funtastic idea,dude!
Awsome fix man. Changed mine now and i can now upload 250,000 +MB/s.
Thanks very very much
Junal, stfu you piece of trash your tool has nothing to do with fixing the file size.
mysqldump -a -u USERNAME -p DATABASE > FILENAME.mysql
and
mysql -u USERNAME -p DATABASE < FILENAME.mysql
It works for me.
hetalsagar
I fully agree.
Two thumbs up!
This really is the ONE and ONLY ONE formula.
It works FAST and in a VERY RELIABLE way.
NONE of the other solutions based on messing around with the conf documents is working nicely.
I have increase them all to 512mb but i can`t upload my dump SQL ![]()
I use joomla with 100mb database.
Thanks anyway.
Everything is OK now ![]()
I use wamp 2.0 after restart solved.
Thanks.
Thanks MAN
Mahesh and all above, i m just saved……
thanks to all
You need to increase two things
max_post_limit
and
upload_max_filesize
Nice! Thanks.
It doesn’t wokr! I changed those three values, but in phpmyadmin it still says only 2M files are available. Anyone got any idea?
David,
Are you using wamp, for wamp you also need to edit the php.ini file in the apache folder.
Thanks,
Muhammad Umair
yea man
in wamp have to change php.ini in /bin/apache/ApacheX.X/bin/ and in /bin/php/php5.x.x/
It’s working
Thanks
What you mean phpmyadmin you need to choose the values in php.ini, you don’t need to do anything in phpmyadmin.
Thank you
is it these to lines in the php.ini file you change?
upload_max_filesize
post_max_size
Thanks
How can I increase the size to import a DB from. I am trying to import the DB using phpmysqladmin and it says error size exceeds.
Math – in /etc/php.ini change the 2 variables talked about here:
post_max_size = 50M
upload_max_filesize = 50M
You can set “50M” to whatever file size you want – just be careful if you let users upload their own files via a php script because it could get real hairy real quick. Otherwise don’t worry about it.
Then you have to restart the web server
As root: /etc/rc.d/init.d/httpd restart
When you reload (going back to the page via web browser) phpmyadmin you should see your file size change.
I’ve just been trying to fix the same problem on a test installation of WordPress 3.0 on Ubuntu 9.10. It’s using localhost, and I installed the LAMP stack myself using Apache2 and PHP5. None of the fixes above seemed to work, clearly because a different ini file was being read.
The fix for me was to find the php.ini file being used for Apache2 and that was found in the folder:
/etc/php5/apache2
Making the change to the entry post_max_size (in my case setting it to 16M) made an immediate effect without needing to restart apache, or reload the browser.
All the other php.ini files proved to be irrelevant. With the installation I had, there was no original php.ini in the root, nor in wp-admin, nor in wp-content and putting them there had no effect.
It’s clear that the solution for Windows users is slightly different since putting a php.ini file with the appropriate settings in wp-admin seems to be a popular choice. But it certainly doesn’t work on the typical set-up on Ubuntu.
For reference, the LAMP stack was installed to Ubuntu in the default locations, and the WordPress install went to /var/www into a folder called wordpress.
Thanks for all the comments above – without them I wouldn’t have been able to track down my problem.
Thanks
Mahesh and all above, i m just saved……
thanks to all
The fourth thing you might need to adjust is the max_execution_time in php.ini since the file may not complete uploading if the script times out.
1. Open PHP.INI file
2. upload_max_filesize:20M
3. Save & Close File.
4. Resart Apache (Or your WAMP or XAMP whatever you use)
5. Noe go to PHPMYADMIN IMPORT , it will allow you to import file up to this size.
6. If error ocurrs then increst MEMORY LIMIT in PHP.INI
- YOGI GHORECHA
upload_max_filesize:20M and post max size 20M olduğunda sorun giderilmektedir.
Dear just go to php.ini and search post_max_size
here u can set import and Export size limit ,
after doing this restart the computer
You can Watch this video to know How to increse file upload size in wamp server by editing php.ini.
Fuck your ass with donkey Dick….










January 4, 2008 at 2:41 pm
hi this is nizam from uk . basicaly from i am bangladesh too . thanks mate your tips helped me alot to import my existing database in my localhost . thanks alot .
hat off to you bangali .
i am bangali too — proud to be that .
Niz
September 10, 2010 at 12:39 am
Very stupid, you can do it in php.ini
chnage the value of upload_max_filesize
Even you are bengali you should use ur brain