Comments
Recently
NextGen Gallery: upload_max_filesize
By Bradley Charbonneau | Filed under Help, Plugins, WordPress
The fabulous NextGen Gallery was maxing (timing) out when uploading zip files. My server said it could only handle 2 MB uploads, so I went searching.
Most help said to make changes to the .htaccess file, but I did that and I think my host has something set up (suexec or something) that doesn't allow such code in there, so it said to create a php.ini file with the following code:
-
post_max_size = 50M
-
upload_max_filesize = 40M
-
max_execution_time = 900
-
memory_limit = 30M
Did that and put it in the root directory with no luck. Someone else said to put it in the directory where the script was, so I put it in the NextGen Gallery folder. Nope. Put it in ALL of the NG folders. Nope. Finally, seeing the WP plugin in action, I put the php.ini file in the /wp-admin/ folder and voila!
Also, when making the php.ini file, I used the code above, not the one with "php" in the directives. Those were for the .htaccess file.





July 26th, 2008 at 6:52 pm
Very accurate post!!! Thanks so much.
I had to increase memory_limit above 30M so a thumbnail could get created for a 3.5mb picture. I set it to 100M just cuz I did not want to spend time tweaking exactly.
Thanks again!
July 26th, 2008 at 6:53 pm
We also have to remember to watch this php.ini file during an upgrade.
August 4th, 2008 at 12:00 am
I'm having the exact same problem, and have probably trawled my way through all the same places as you have to find the answer.
I found an alternative solution here http://wordpress.org/support/topic/179176 - see staceppa's comment at the end of the thread - which works for most of my files but not the very largest ones, even if I increase the value from 48M to 100M.
So I figure now it's time to try your solution. I need a bit of help though.
What do I use to make the php.ini file? Is Dreamweaver OK? What format should it save itself as? Mine has saved as a plain text document. Is this OK?
Do I need the numbers from your code above, or do I leave those out?
If I add the file to the /wp-admin/ folder as you suggest, am I likely to be overwriting the original php.ini file (which isn't listed as a file there but which I'm worried might be hidden or something.)
Thanks heaps
:)
August 4th, 2008 at 9:34 am
Splendid, this worked liek a charm for my zipped jpg archive! Thxs!
September 3rd, 2008 at 5:16 pm
i'm having the same problems as webweaver and they aren't solved by either two solutions (http://wordpress.org/support/topic/179176 - and this one).
Just to be sure: do I have to add [PHP] as first line in the php.ini?
And... when uploading a pic ngallery says "Note : The upload limit on your server is 8MByte". Then the actual pic is saved but the thumbnail isn't.
So help!
September 9th, 2008 at 10:59 pm
webweaver: I just used Notepad (on WIN) to make the php.ini file. You don't want to use something like Word that will put extra code in there. But then it does seem to save it as a .txt file. I don't really know how to change that other than using a simple file folder system and I changed the .txt to .ini (I used FileZilla as it shows files with their real extensions and you can just change them).
Leave the numbers out, I think they're just for show here on this site.
I didn't see a php.ini file in the wp-admin folder, but if there is one, maybe rename it something else (php_original.ini) and then upload your php.ini file. But I don't think I had a php.ini file in that folder.
I hope that helps!
September 9th, 2008 at 10:59 pm
pr'muts: No, I don't think you have to add [PHP] in the php.ini file, just the text up there in the code (without the line numbers).
September 9th, 2008 at 11:01 pm
Jim: You're absolutely right and I'm sure it's something I'd forget and then wonder why the limits were back to where they were! Always good to backup, of course. I've been using WP's new automated upgrade plugin quite a bit and loving it. I wonder if it deletes all folders (well, the wp-admin etc. folders) and the uploads the new versions or if it keeps files it doesn't recognize. I guess we'll find out ...
Thanks for posting, Jim.
September 30th, 2008 at 7:45 am
Thanks a million for this you guys. I've been tearing my hair out trying to fix this glitch for my clients.
October 14th, 2008 at 9:15 pm
Thanks, pal, for doing the research for me and saving me hours of aggravation -- hours I just don't have right now. You're the best.
October 30th, 2008 at 4:09 pm
Perfect! Thanks!
Mike
November 6th, 2008 at 11:27 am
THANK YOU SOOOOO MUCH ! I have been looking for a solution to this problem for more than 3 months and now, thanks to you, I finally succeeded ! You're my hero ! xD
November 8th, 2008 at 6:03 pm
Just found this solution after looking for months. I guess you're rising in the Google search rankings. This definitely worked for me without having to do anything else. I added the parameters to the php.ini file, dumped it into wp-admin and it worked like a charm. Thanks! Someone should now write this as a plug-in.
November 28th, 2008 at 5:23 am
Awesome! Creating this php.ini file really did the trick for me! Thank you for sharing.
I guess it's not always about the upload size (mine was 64MB preset, so shouldn't have been a problem here), maybe it's the time out thingy that's causing problems with the zip upload.
Anyway, it's working perfectly now!
(Leave the numbers out in the code, they don't belong in the ini-file. Also the file must be named php.INI, not .txt or .doc or anything, you can change file extensions in your FTP program or setup your Windows Explorer to show file extensions, just google it if you don't know how to activate this feature).
Good luck to everyone out there having the same problem! :)
December 1st, 2008 at 5:56 pm
I'm still having the same problem and nothing seems to work. I fixed the download limit, but the memory limit still an issue and I do not know what to do to fix it. I tried everything here.
December 7th, 2008 at 5:29 am
I am attempting this fix now it's 12:30 in the afternoon (British UK time) and i have been up since 6:00pm last night trying to fix this problem. I hope this works. I'll keep you posted. Thanks!
December 7th, 2008 at 5:32 am
Been going for five minutes now longer than usual so who knows it might work fingewrs crossed X
December 7th, 2008 at 5:38 am
There seems to be alot of conffusion about how to create this file so i have added it to my server as a download. Please goto the link below and download the .rar file.
Unzip the rar archive and the php.ini file is contained within. All that's needed is to upload to the required directory.
I thought I would share it as people kindly let me know what i needed in the first place. Hope this helps someone.
http://astralprojectionuk.site88.net//phpdownload/php.rar
December 7th, 2008 at 5:39 am
CORRECT DOWNLOAD LINK I ADDED A SECOND / BY ACCIDENT! OOOPS! SORRY HERE IS THE LINK AGAIN! LOL!
http://astralprojectionuk.site88.net/phpdownload/php.rar
December 7th, 2008 at 5:40 am
I think this has fixed my problem it appears to work perfect. Thank you.
December 14th, 2008 at 11:48 am
THANK YOU!! I've searched for hours and kept trying different directories as well.
February 6th, 2009 at 2:18 pm
Sweet, thanks a lot, I've been pulling hair over this for some time now!
February 6th, 2009 at 6:25 pm
perfect tutorial! thanks a zillion!
March 12th, 2009 at 9:42 pm
hello! so this was great to find-- and i made the /ini file and uploaded it -- and the uploader appeared to be working until the very end -- when it gives an "HTTP error" any ideas?
April 25th, 2009 at 8:03 am
thank you!
i have been messing around with trying to get this plugin to work right for a couple of months now, and this simple "fix" and easy to understand directions has finally fixed my problems!
Now my thumbnails are working and I'm not getting those crazy memory errors any more!
Thank you again!
June 8th, 2009 at 5:03 pm
[...] NextGen Gallery upload max filesize Likoma Posted by root 5 minutes ago (http://www.likoma.com) Hot flashes sexy stories 96186 views using google apps email for i found an alternative solution here http wordpress org support topic 179176 see staceppa comment at the end time and i have been up since 6 00pm last night trying to fix this problem copyri Discuss | Bury | News | NextGen Gallery upload max filesize Likoma [...]
June 15th, 2009 at 4:16 am
Fantastic post, I am a big fan of NextGen Gallery, so I am very happy to read this post. I found your blog a few days ago on Technorati and have been reading it over the past few days.
June 17th, 2009 at 8:50 pm
THANK YOU!! I've searched for hours and kept trying different directories as
June 29th, 2009 at 6:40 pm
THANK YOU. I've also been searching for quite some time between different sites. This is the only solution that has worked.
July 7th, 2009 at 11:19 pm
[...] NextGen Gallery: upload_max_filesize [...]
September 5th, 2009 at 5:30 am
Finally a solution to this plugin, thanks a bunch Bradley, this really did the trick.
September 7th, 2009 at 2:38 pm
Thanks, not sure if I would of figured this one out w/o ya.
September 12th, 2009 at 9:28 pm
Very usefull tips for "upload file" in PHP. Thanks!
October 17th, 2009 at 10:42 pm
[...] Read this article: NextGen Gallery: upload_max_filesize | Likoma [...]
November 22nd, 2009 at 7:55 am
doesnt work for me :/
November 29th, 2009 at 8:52 pm
Thanks much for this one. I read through so many articles trying to resolve this. No one mentioned to put the php.ini file in wp-admin. Good troubleshooting.
November 30th, 2009 at 8:43 am
I did exactly as the tutorial said. Created a php.ini, put the code in (without the numbers 1,2,3,4) saved & uploaded to wp-admin and it still doesn't work for me.
December 14th, 2009 at 4:24 am
Thanks, this works also for problems uploading images bigger than 2MB.
February 25th, 2010 at 5:13 pm
Thanks so much for the tip; I had my .ini file in all the logical places. Who would have thought the plugin was set to read the one in the wp-admin folder. Thanks for your post!
March 22nd, 2010 at 5:44 am
[...] Likoma.com Billeder, Brugervenlighed, Filstørrelser, PHP, php.ini, [...]