ID: 27853 Updated by: [EMAIL PROTECTED] Reported By: BTO at ono dot com -Status: Open +Status: Bogus Bug Type: GD related Operating System: Linux PHP Version: 4.3.4 New Comment:
Not a bug, loading this image into memory simply takes this much memory: php -r 'echo xdebug_memory_usage()."\n"; $f = imagecreatefromjpeg("56280012.JPG"); echo xdebug_memory_usage()."\n";' 28960 7949920 as you see about 8mb. Previous Comments: ------------------------------------------------------------------------ [2004-04-03 10:16:48] BTO at ono dot com 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 this bug report at http://bugs.php.net/?id=27853&edit=1