PDA

View Full Version : PHP Max upload size


Manu
07-16-2006, 02:16 PM
When using Wordpress, I'm trying to upload an image with a post. It seems that it does not allow uploads larger than 1MB.
Here's the error I get:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 5652 bytes) in
/home/virtual/site148/fst/var/www/html/wp-admin/admin-functions.php on line 714

I changed my /etc/php.ini and increased the maximum upload size, same problem (although I can't restart apache so that may be the problem.)

Maybe it's something about Wordpress but I checked the code and it looks like it uses the global PHP settings for that.
So how would I go to increase the maximum upload size to about 3MB?

Matt
07-16-2006, 02:18 PM
It's not the upload limit actually, but rather some post-upload transformation issues that is causing the error (8388608 bytes = 8 MB). To fix that, you'll need to increase the memory limit of applications under the directory. Create a file named .htaccess under /var/www/html/ and toss the following in there:

php_value memory_limit 16M

Manu
07-16-2006, 02:36 PM
I got the same error with 16MB but 32MB did it. I hope that's not putting too much load. :)

Thanks.