From: BTO at ono dot com Operating system: Linux PHP version: 4.3.4 PHP Bug Type: GD related Bug description: Problems allocating memory for imageCreateFromJpeg
Description: ------------ I have the following problem... I wrote a script for automatically resizing and thumbnailing uploaded jpg images, the problem takes place when the script reaches the function imageCreateFromJpeg, in some cases (I don't know exactly which ones). PHP throws a message similar to this one: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 6176 bytes) in /path/to/scripts/script.php on line XXX Notice that the allowed memory is much bigger than the memory which is tried to allocate with only some variebles allocated (that doesn't seem logical). Try this image http://wintop.host.sk/56280012.JPG This bug is supposed to be solved (http://bugs.php.net/bug.php?id=25127) but it still happens to in a PHP 4.3.4 on a linux server. Reproduce code: --------------- http://wintop.host.sk/erasmus0304/bug.php.txt Expected result: ---------------- OK Actual result: -------------- Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 6176 bytes) in /path/to/scripts/script.php on line XXX -- Edit bug report at http://bugs.php.net/?id=27853&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27853&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27853&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27853&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27853&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27853&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27853&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27853&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27853&r=support Expected behavior: http://bugs.php.net/fix.php?id=27853&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27853&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27853&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27853&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27853&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27853&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27853&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27853&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27853&r=float