#25127 [Opn->Ver]: error with memory limit

From: Date: Tue, 19 Aug 2003 12:06:59 +0000
Subject: #25127 [Opn->Ver]: error with memory limit
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-46210@lists.php.net to get a copy of this message
ID: 25127 Updated by: sniper@php.net Reported By: henrik dot gebauer at web dot de -Status: Open +Status: Verified Bug Type: GD related Operating System: Mandrake 9.1 -PHP Version: 5 (latest CVS) +PHP Version: 4.3.3RC5-dev, 5.0.0b2-dev New Comment: [jani@rh62 jani]$ php -dmemory_limit=9388608 -r 'imagecreatefromjpeg("p1010025.jpg");' Fatal error: Allowed memory size of 9388608 bytes exhausted (tried to allocate 7936 bytes) in Command line code on line 1 /usr/src/web/php/php4_3/main/streams.c(392) : Stream of type 'STDIO' 0x085CAF2C (path:p1010025.jpg) was not closed Previous Comments: ------------------------------------------------------------------------ [2003-08-19 06:25:00] henrik dot gebauer at web dot de My configure line: './configure' \ '--with-apxs2=/usr/local/apache2/bin/apxs' \ '--with-config-file-path=/etc' \ '--with-zlib' \ '--with-gd' \ '--with-mysql=/usr/src/mysql-4.0.14/include/' \ '--enable-sockets' \ '--enable-memory-limit' \ '--enable-trans-sid' \ '--with-jpeg-dir=/usr/src/jpeg-6b' \ '--with-png-dir=/usr/src/libpng' The error does not occur with images with a smaller file size. Try this picture to reproduce it: http://www.henrikgebauer.de.vu/bilder/klassenfahrt_kanu2003/p1010025.jpg ------------------------------------------------------------------------ [2003-08-19 04:42:17] sniper@php.net What was the configure line you used to configure PHP? (config.nice) ------------------------------------------------------------------------ [2003-08-19 04:22:19] henrik dot gebauer at web dot de I get the same error using the latest CVS version. It seems to be luck if it works or not because after reloading the script a few times it works. ------------------------------------------------------------------------ [2003-08-18 09:18:55] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2003-08-18 08:44:52] henrik dot gebauer at web dot de Description: ------------ Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 7936 bytes) in /mnt/win_e/hosts/tests/gallery-creator/step2.php on line 67 The line contains and imagecreatefromjpeg() call. With reloading the script, the allowed memory size appears to grow. After the 5th reload I get the error: Fatal error: Allowed memory size of 18901728 bytes exhausted at (null):0 (tried to allocate 7936 bytes) in /mnt/win_e/hosts/tests/gallery-creator/step2.php on line 67 I compiled PHP as a module for Apache 2 with --enable-memory-limit Reproduce code: --------------- <?php $image = imagecreatefromjpeg('image.jpeg'); echo 'success'; ?> Expected result: ---------------- success Actual result: -------------- Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 7936 bytes) in /mnt/win_e/hosts/tests/gallery-creator/step2.php on line 67 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25127&edit=1

« previous php.bugs (#46210) next »