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:
[code]post_max_size = 50M
upload_max_filesize = 40M
max_execution_time = 900
memory_limit = 30M[/code]
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.
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!
We also have to remember to watch this php.ini file during an upgrade.
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
:)
Splendid, this worked liek a charm for my zipped jpg archive! Thxs!
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!
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!
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).
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.
Thanks a million for this you guys. I’ve been tearing my hair out trying to fix this glitch for my clients.
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.
Perfect! Thanks!
Mike
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
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.
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! :)
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.
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!
Been going for five minutes now longer than usual so who knows it might work fingewrs crossed X
I think this has fixed my problem it appears to work perfect. Thank you.
THANK YOU!! I’ve searched for hours and kept trying different directories as well.
Sweet, thanks a lot, I’ve been pulling hair over this for some time now!
perfect tutorial! thanks a zillion!
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?
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!
[…] NextGen Gallery upload max filesize Likoma Posted by root 5 minutes ago (https://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 […]
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.
THANK YOU!! I’ve searched for hours and kept trying different directories as
THANK YOU. I’ve also been searching for quite some time between different sites. This is the only solution that has worked.
[…] NextGen Gallery: upload_max_filesize […]
Finally a solution to this plugin, thanks a bunch Bradley, this really did the trick.
Thanks, not sure if I would of figured this one out w/o ya.
Very usefull tips for “upload file” in PHP. Thanks!
[…] Read this article: NextGen Gallery: upload_max_filesize | Likoma […]
doesnt work for me :/
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.
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.
Thanks, this works also for problems uploading images bigger than 2MB.
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!
[…] Likoma.com Billeder, Brugervenlighed, Filstørrelser, PHP, php.ini, […]
Thanks! that worked for me, no more strange errors about memory. I am hosted at strato.
Thanks! You saved me hours.
Thanks! I ran into this, and I know this is old, but it worked perfectly. Saved me a ton of headaches
Thanks, found your post after tying everything under the sun. Just dropped php.ini in wp admin folder and now everything works perfect, wish i would have found this post sooner…
Hello Bradley,
Thanks for sharing this. It would really helps.
Hi,
this worked for me:
Edit nextgen-gallery/lib/gd.thumbnail.inc.php
Find the line that says:
// @ini_set(‘memory_limit’, ‘128M’);
Remove the // to uncomment the line.
Beneath that add:
@ini_set(‘post_max_size’, ‘128M’);
@ini_set(‘upload_max_filesize’, ‘128M’);
You would just need to watch out for this when you upgrade the plugin.
Cheers :)
Thanks, Mel!
hi !
using nextgen public uploader i experience the following:
after successfully uploading a photo the browser refreshes the page but the pic isn’t displayed.
when manually reloading the pic gets uploaded again and after that the first upload can be seen . . .
any ideas to this ?
every browser and wpms
thanks :)
Thank you! I tried everything but only that solution worked for me. Thank you so much.
I want to code one PHP script which allows me to generate thumbs of given images with specified dimensions and names as per Next-Gen Gallery Plugin of WordPress.
I have website for cover pages: http://facebook4free.com/
Thumb Gallery Page: http://facebook4free.com/category/facebook-cover-pages/abstract-facebook-cover-pages-facebook-cover-pages/
Main Image Page: http://facebook4free.com/abstract-cover-pages-for-facebook-profile-2/facebook-images/image/1-cover-photo-82140/
Issue is timeout when I upload images in wordpress plugin. It uploads images in create their thumbs but when I upload more than 10 images it fails. So I want to separately create PHP script which create thumbnails of my FB cover pages with given dimensions and specified name (a pattern).
Many of the images are in .jpg, .png formats but all are having dimensions of 851×315.
Any help would be appreciated.
Very good! Really this is a different plugin for WP. Its structure in HTML and JS is well organized and helps us a lot with a great interface! Thank you!
Currently it looks like Expression Engine is the top blogging platform available right now. (from what I’ve read) Is that what you’re using on your blog? IPNAACECNUQMLQ http://IPNAACECNUQMLQ.com