PHP list,
I have a PHP script that resizes an image. It takes just about whatever
size and shrinks and crops it down to 320X240.
I've found that these days, it's not uncommon for people to take images
straight off their digital camera, which can be 3000X2000 pixels in
image size, even if the jpeg file containing the image is only 200 KB.
When working with the image, it gets uncompressed and takes up a lot of
memory.
So sometimes I've seen an error in my logs that says:
Fatal error: Allowed memory size of 8388608 bytes
exhausted (tried to allocate 8000 bytes) in
/home/public_html/Action.php on line 153.
I contacted my web host provider, and they recommended increasing the
allowed allocation limit in "/etc/php.ini".
Right now my allocation limit, assuming I'm looking at the right setting
is 8 megabytes:
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
What would be a recommended size? While I want to have enough to work
with large images, I don't want to overload the server.
Actually, I have no idea what the potential dangers are. Just on
principle I think it's a bad idea to edit php.ini without some guidance.
What should I set the memory limit to?
--
Dave M G
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php