views:

34

answers:

1

I know there are a lot of questions on here about this, but most of them seem to be from people who don't know that 'memory_limit', 'post_max_size', and 'upload_max_filesize' are PHP_INI_PERDIR (i.e. they can't be changed using ini_set()). I already learned that the hard way.

However, everything indicates that I should be able to change them using a .htaccess file—everything, that is, except my actual experience.

Here are the contents of my .htaccess file:

# Allow large file uploads
php_value memory_limit 4294967296
php_value post_max_size 1073741824
php_value upload_max_filesize 524288000

I've tried a number of different combinations, but none of them seem to have any effect on anything. I know I've gotta be missing missing something, but I can't for the life of me figure out what that something is.

Help?

P.S. I'm running PHP 5.2.4 locally on Mac OS X 10.4 from entropy.ch.

+4  A: 

You need to permit those settings to be changed in a .htaccess file. For that, you need AllowOverride Options or AllowOverride All in a relevant section your httpd.conf file (in a <Directory> block for that directory or a parent thereof).

Note also this will only work if you're using Apache and mod_php5 (i.e., no CGI/FastCGI/whatever).

See also the manual.

Artefacto
Ah, that was precisely it. I'd assumed I was already set up for that. (You know what happens, etc.)Boy did it take a lot of searching and trial and error just to find the right .conf file and the right server to restart....But thank you!
GPHemsley