Increase Size of import File in phpmyadmin
Posted by: magesh.apr (59.97.88.---)
Date: December 08, 2008 11:18AM

Hi to all,


I want to import 4 MB .sql file into my database, but i receiving a error message like

/*******************************************/
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.
/*******************************************/

How can i increase the size of file permission in wampserver,

Can any one help me in this please.


Regards
magesh

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: yfastud (Moderator)
Date: December 08, 2008 01:14PM

Try these different settings in C:\wamp\bin\apache\apache2.2.8\bin\php.ini

Find:
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M

Change to:
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M

Then restart wamp to take effect

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: magesh.apr (59.97.88.---)
Date: December 08, 2008 01:41PM

Hi,

Thank you so much, I had uploaded my data to database successfully with your guide,


Nice to meet you yfastud (Moderator)



Regards
magesh

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: yfastud (Moderator)
Date: December 08, 2008 02:26PM


Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: ashokvissu (---.246.224.57.static-hyderabad.vsnl.net.in)
Date: December 09, 2008 04:54AM

Thanx dude u've done a great job,it's working.

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: franki (---.hsd1.ma.comcast.net)
Date: September 25, 2009 03:19AM

I'm getting this same exact error, but my php.ini does not have max_execution_time, max_input_time, memory_limit anywhere? What the dealio??

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: yfastud (Moderator)
Date: September 25, 2009 04:00AM

make sure to open correct php.ini through wamp tray icon; if they're not there, just simply add them winking smiley

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: franki (---.hsd1.ma.comcast.net)
Date: September 27, 2009 01:52AM

Ah thanks. I thought I had the right one, but I guess I didn't. It turned out I was only missing post_max_size but I added it. So I restarted the services and still am getting an error when importing a 20mb sql file.

This is the error I get:
Fatal error: Maximum execution time of 300 seconds exceeded in C:\wamp\apps\phpmyadmin2.11.6\libraries\import\sql.php on line 118

I have max execution time set to 5000 like what was suggested. Any ideas?

Thanks!

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: toumimi (---.238.115-78.rev.gaoland.net)
Date: September 27, 2009 01:44PM

You can add this line in phpmyadmin/config.inc.php file and change the value :
// maximum execution time in seconds (0 for no limit)
$cfg['ExecTimeLimit'] = 300;

Florian

WampServer Patch (Screenshots)
Topic EN : www.wampserver.com
Topic FR : www.wampserver.com

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: franki (---.hsd1.ma.comcast.net)
Date: September 27, 2009 04:24PM

Thanks toumimi. That was the issue.

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: jerryboy78 (---.adsl.sunbeach.net)
Date: March 13, 2010 08:23AM

Thanks a lot yfastud. This solution was extremely helpful smiling smiley

"Live 2 learn, Learn 2 live"

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: nelsonm (---.dsl.sfldmi.sbcglobal.net)
Date: November 11, 2010 03:37AM

Hi,

One question...

why wouldn't you make the changes in both...

"C:\wamp\bin\apache\apacheX.X.X\bin\php.ini"

and

"C:\wamp\bin\php\phpX.X.X\php.ini"



Edited 1 time(s). Last edit at 11/11/2010 03:39AM by nelsonm.

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: November 11, 2010 05:35AM

becasue the php.ini in the php folder is not used for your websites. its only used for the wampserver menu.

you should not edit this file..


wampserverw ill look after and remember any changes you make in the php.ini in the apache folder for the current version of php.

if you switch versions of php , wampserver copys the other back to phpforapache.ini in the php folder so your changes are not lost for that version of php

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: nelsonm (---.dsl.sfldmi.sbcglobal.net)
Date: November 11, 2010 09:07AM

Well.... I did change both files to identical values for the parameters described above. Will it mess anything up to leave them that way?

Also, as a point of interest, i found this passage on the PHP site about setting; memory_limit, upload_max_filesize and post_max_size.

Quote

post_max_size integer
Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size. When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used. If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty.


So... basically, it says that "memory_limit" must greater then "post_max_size" which is greater then "upload_max_filesize".



Edited 3 time(s). Last edit at 11/11/2010 09:14AM by nelsonm.

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: stevenmartin99 (---.251.255.15.threembb.ie)
Date: November 11, 2010 09:34AM

Not really must be larger... But which even hits he limit first stops the script so if u need

So if u need to upload 4mb and set them both to 4mb then yes the memory limit will hit the 4mb before the file is uploaded


There is not risk with going alot bigger with these values. About 50MB is usually set on public hosting

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: nelsonm (---.dsl.sfldmi.sbcglobal.net)
Date: November 11, 2010 09:46AM

One last thing....

Even with the parameters above increased, i can only import a little over 5000 records at a time of a 40000 record xlsx file through phpmyadmin. I keep getting the following error message:

Quote

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 41 bytes) in C:\Program Files\wamp\apps\phpMyAdmin3.3.8\libraries\PHPExcel\PHPExcel\CachedObjectStorage\Memory.php on line 47


I have searched the internet and have not found a definitive answer to the problem. Do you have a clue?

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: blah2012 (---.STATIC.turnkeyinternet.net)
Date: March 17, 2012 11:41PM

Thanks for the hack, but why isn't this shit the default?

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: eugene.liskovets (---.lightspeed.irvnca.sbcglobal.net)
Date: May 23, 2012 08:31PM

You can increase allowed memory size. Just change ini_set('memory_limit', '256M'); on string 32 in "C:\wamp\apps\phpmyadmin3.3.9\libraries\import\xls.php" or "C:\wamp\apps\phpmyadmin3.3.9\libraries\import\xlsx.php" (it's my path, yours can be different).

Options: ReplyQuote
Re: Increase Size of import File in phpmyadmin
Posted by: mohsinworld (---.qubee.com.bd)
Date: March 23, 2014 07:40PM

Worked like charm Mr. yfastud It's really pleasure to me to solve this irritant problem. Now i have full freedom of upload smiling smiley

------------------------------------------------------------------------------------------------------------
To know me visit: Mohsin Alam

Options: ReplyQuote


Sorry, only registered users may post in this forum.