|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-27 11:30 UTC] tony2001@php.net
[2004-07-27 20:16 UTC] speps84 at hotmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 27 08:00:01 2025 UTC |
Description: ------------ I wrote a script that uses GD to slice big jpeg files (about 50mb, 21600x21600) into small 100x100 jpeg. To make this, I have to open these big files and I use the function imagecreatefromjpeg. While loading (HDD is working), I receive this error: FATAL: emalloc(): Unable to allocate 86400 bytes I have tested different values of memory_limit in php.ini ( and with --enable-memory-limit) even the unlimited value of -1: always the same error. This error happens only with very big jpeg files (37mb and 47mb), not with about 4mb jpeg. Reproduce code: --------------- Launching PHP in Command Line mode under Windows XP: php "myscript.php" --enable-debug --enable-memory-limit The PHP Code is very simple : $img = imagecreatefromjpeg("bigfile.jpg"); Expected result: ---------------- Opening of the image. Actual result: -------------- FATAL: emalloc(): Unable to allocate 86400 bytes