Getting those Apache/PHP settings just right
Warren is the guy who has been running Gallery for a few years now. Me? I ran it at my previous job but I didn't get into it much.
Now I'm running Drupal and on the default Apache/PHP install, PHP is limited to 8MB of RAM. That works fine for most everything... but when you get into graphics processing, it isn't even close. Graphics Processing? The image upload (and photo gallery) module for Drupal take an uploaded image file and then generates a preview size (640x480) image and a thumbnail (125x125?) image. It can use ImageMagick or the GD image processing packages.
I uploaded some smaller images and it worked fine. I tried a .jpg about 478K in size and blam, it didn't work and I just got a blank result page. Hmmm, what's going on?
Checked my virtual host's error log and saw:
PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4180 bytes)
Ok, I up it to 16MB but that didn't help because I got:
PHP Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 2560 bytes)
Ok, I decided to bump it up to 64MB. That seems to have worked and I tested it with 10 more images... with the largest being 1MB in file size with a resolution of 2,304x1728. I hope 64MB of RAM for PHP will handle anything I can throw at it.
Hey Warren... what did you have your PHP setting set for when you uploaded that huge image of downtowm Manhattan after 9/11? Would 64MB cut it for that?
You can see the Cybernet Zero Footprint PC gallery I created during the testing. Hey, they were the only images I had laying around at the time. :)