2MB file limit in Gallery2 - is info update needed in FAQ?

ekendra
ekendra's picture

Joined: 2004-11-11
Posts: 8
Posted: Wed, 2005-08-17 20:31

Hello there.

I'm really impressed with Gallery2 and its modular structure.

I've upgraded from version 1 and am runnign into a bit of difficulty uploading 6 Megapixel images over 2MB. I searched for a solution (of course :wink: ) and found this:

Quote:
Why can't I upload big files (over a megabyte or two)?

Craig Goranson wrote a very informative email (http://marc.theaimsgroup.com/?l=gallery-users&m=102589601604892&w=2) about how to fix this issue.

Gallery tries to override the upload_max_filesize and post_max_size directives in its .htaccess file. This means that changing the setting globally may still result in it being overridden at the .htaccess level, so you may want to just change the directive there instead of globally. Gallery tries to set both of the directives to about 20 megabytes, so this will only affect you if you're going to upload files over that size.

If you're using Apache 2, especially with something like RedHat, you may need to edit another directive, LimitRequestBody, as described in this forum post (http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=7419). Setting this directive to 0 (i.e. LimitRequestBody 0) will allow you to upload as big a file as you want (until you hit upload_max_filesize and/or post_max_size -- see the above email link for more information).

This seems helpful but specific to gallery 1 as I cant seem to find any .htaccess file in the new version. Gallery 1 had it in the root directory.

So is this information still relevent to Gallery 2 ??

I've already had my administrator bump the upload limit up to 16MB so that shouldn't be any sort of issue.

How to get around this one so I can upload pics over 2MB (essential for how I'm using Gallery) ??

----
The following information is required to get an answer:
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): http://www.devaswami.com/pictures
Gallery version: latest version 2 pre-release
Apache version: Apache/1.3.33
PHP version (don't just say PHP 4, please): PHP/4.4.0
Graphics Toolkit: GD, ImageMagick, NetPBM
Operating system: FreeBSD 4.11-STABLE #1
Web browser/version (if applicable): Firefox

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-08-17 21:17

you can create a .htaccess file in the gallery2 dir.

 
ekendra
ekendra's picture

Joined: 2004-11-11
Posts: 8
Posted: Wed, 2005-08-17 21:37
mindless wrote:
you can create a .htaccess file in the gallery2 dir.

so just in the root dir same as gallery 2? anything specific need to go into it? is there some outline of what control i can have via the .htaccess ? (parameters, etc..)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-08-17 22:03

http://www.php.net/manual/en/configuration.php
yes, .htaccess goes in the gallery2 dir.

 
ekendra
ekendra's picture

Joined: 2004-11-11
Posts: 8
Posted: Thu, 2005-08-18 09:38

I created an .htaccess file as suggested (see attached file) and i uploaded it to the main gallery2 directory.

did i enter the parameters correctly because it still seems to block pics over 2MB in size from uploading?

here's whats inside the .htaccess file:

php_value post_max_size 128M
php_value upload_max_size 128M

frustrating this one. also some of the instructions in the FAQ are not relevant to gallery2 (the third step in particular as there is no file by that name - if i missed it then someone please let me know where it is ???)

any help would of course be greatly appreciated.

ekendra :roll:

 
sumirp

Joined: 2005-08-19
Posts: 2
Posted: Fri, 2005-08-19 01:09

Hey ekendra,

You need to put both 128M in quotes. Should look like this:

php_value post_max_size "128M"
php_value upload_max_size "128M"
 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-08-19 14:55

not really.

 
ekendra
ekendra's picture

Joined: 2004-11-11
Posts: 8
Posted: Fri, 2005-08-19 20:05

???

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2005-08-20 01:17

meaning you don't put quotes around 128M

sumirp's post was the first I'd ever seen or heard of doing that. If you can't override your post_max_size or upload_max_size via .htaccess then your host has configured their setup so those values cannot be overridden.

Good luck finding a reference to wrap that value in quotes:
http://www.google.com/search?hl=en&lr=&q=post_max_size+htaccess&btnG=Search

 
sumirp

Joined: 2005-08-19
Posts: 2
Posted: Tue, 2005-08-23 18:02

http://www.extrosoft.com/content/view/23/30/

I may be totally wrong, just something I read and tried and it worked for me...

 
shoobeedoodoo

Joined: 2004-01-11
Posts: 78
Posted: Wed, 2005-08-24 21:30

Any other suggestions for this?

I'm having the same problem in uploading video clips over 2 MB.

Any help would be greatly appreciated.

Thanks,
Stephen

 
RalphTheWonderLlama

Joined: 2005-07-16
Posts: 68
Posted: Thu, 2005-08-25 00:30

I didn't have to edit/add any .htaccess files to get mine to work. I didn't have any in my RC1 install either. See my thread on how I fixed it here:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=33060

This link helped especially. The only change was to php.ini since there were no .htacces and add_photo.php files.

http://gallery.menalto.com/modules.php?op=modload&name=GalleryDocs&file=index&page=gallery1-install.faq.c.php#gallery1-install.faq.c.6

 
likoma

Joined: 2005-07-07
Posts: 10
Posted: Tue, 2005-08-30 18:00

The problem may be with your host. I did all of the steps above and I could get the 128 MB batch limit changed, but not the 2 MB (per image/movie) changed. Finally, I used "From Web Page" and I uploaded the 4 MB movie to another folder that wasn't blocked by permissions (i.e. not inside my albums--I couldn't seem to change permissions on those folders anyway) and then it worked fine.

http://www.totalchoicehosting.com/forums/index.php?showtopic=4673&view=findpost&p=146704

Hope this saves someone else some time!

- Bradley

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2005-08-31 17:59

Yes, your host can restrict those values from being changed. If you need those limits changed and you can't with .htaccess or don't have access to php.ini then, as likoma, states, you need to find a new host.

 
likoma

Joined: 2005-07-07
Posts: 10
Posted: Wed, 2005-08-31 19:19

Or ask your host nicely. ;-) My host upped the limit to 8 MB when I asked, which is fine with me. Anything bigger and I'm happy to do the "From Web Page" method--it's a lot less work than changing hosts (in my case).

 
iampedro

Joined: 2003-12-10
Posts: 41
Posted: Wed, 2007-01-17 20:14

So my host just up'd my limit to 10 mb so that means I can upload pictures the size of 10 meg's correct? Or is that my limit of the amount I can upload or what? Gallery2 dosen't have a limit of what I can upload it is just the amount that I upload is limited to each file would be now be at least 10 meg's a piece correct?

 
gcshum

Joined: 2007-02-13
Posts: 35
Posted: Thu, 2007-02-15 20:09

Just a guess. You may have to restart Apache server.

 
SJ073

Joined: 2007-06-28
Posts: 6
Posted: Fri, 2007-07-06 06:45

Bumping these two values up (post_max_size and upload_max_size) in the php.ini in my PHP binary folder and then restarting IIS worked for me. After restarting IIS and logging back into the gallery you can see the quota was updated to reflect the new values. Thanks for the information!