.htaccess weirdness

curve

Joined: 2008-10-18
Posts: 11
Posted: Sat, 2011-03-26 23:10

I'm working on Gallery v2, and I would like to be able to upload files above 2Mb in size (default on my web host). I've added a .htaccess to the gallery root, code as follows:

<IfModule php_config>
 php_value upload_max_filesize 10M
</IfModule>

That's all that's in the .htaccess file in the gallery root. When the file is there I can't upload any images (there are no errors, even in debug mode), and when the file is not there I can - provided they are less than 2Mb of course!

This seems a weird one, and I haven't been able to find anything on the forums. Any ideas what might be happening?

Thanks,

Pete


Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.14 cgi
Webserver = Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Database = mysqli 5.0.91-community, lock.system=flock
Toolkits = ArchiveUpload, Exif, ImageMagick, Gd
Acceleration = none, none
Operating system = Linux byss.tchmachines.com 2.6.18-194.26.1.el5PAE #1 SMP Tue Nov 9 13:34:42 EST 2010 i686
Default theme = matrix
gettext = enabled
Locale = en_GB
Browser = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2011-03-27 17:30

I believe its supposed to be:
php_value upload_max_filesize 20M
php_value post_max_size 20M

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
curve

Joined: 2008-10-18
Posts: 11
Posted: Sun, 2011-03-27 17:58

Thanks suprsidr.

If I don't use the <IfModule> syntax I just get a 500 error...

 
curve

Joined: 2008-10-18
Posts: 11
Posted: Sun, 2011-03-27 18:09

Heh, just got a response from my web host and for some strange reason I had to put the file size in bytes.

The following worked for me, just in case anyone else needs to refer to this (I don't know why the values are different, I was just suggested them and they work!):

<IfModule php_config>
 php_value post_max_filesize 11534336
 php_value upload_max_filesize 10485760
</IfModule>