|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-04-03 10:16 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 26 13:00:02 2025 UTC |
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.