#26231 [Com]: Memory errors with createimagefromjpeg

From: Date: Mon, 23 Feb 2004 09:53:06 +0000
Subject: #26231 [Com]: Memory errors with createimagefromjpeg
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-55357@lists.php.net to get a copy of this message
 ID:               26231
 Comment by:       php at klieder dot nt
 Reported By:      mike at blueroot dot net
 Status:           Bogus
 Bug Type:         GD related
 Operating System: Linux
 PHP Version:      4.3.3
 New Comment:

if this is not a bug, why does php 4.3.4 crash on this 
situation?
it totally died and can't be accessed anymore..

[Mon Feb 23 10:50:29 2004] [error] PHP Fatal error:  
Allowed memory size of 8388608 bytes exhausted (tried to 
allocate 6400 bytes) in /home/login16/meetingrooms/
gz.functions.php on line 902
[Mon Feb 23 10:50:29 2004] [error] PHP Fatal error:  
Allowed memory size of 8388608 bytes exhausted (tried to 
allocate 44 bytes) in Unknown on line 0


Previous Comments:
------------------------------------------------------------------------

[2003-11-13 19:37:10] iliaa@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

Opening images is a memory intensive operation, just because the file
may appear to be small, it does not mean it's memory foot print is. If
you manipulate images you should increase your memory limit to 20-30
megabytes to avoid these problems.

------------------------------------------------------------------------

[2003-11-12 21:36:16] mike at blueroot dot net

Description:
------------
When trying to create a gd image resource from this jpeg
http://www.blueroot.net/~mike/wrc2003/dscf0216.jpg
I get this error

Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0
(tried to allocate 6400 bytes) in
/home/mike/public_html/wrc2003/test.php on line 5

The file is 778061 bytes.

This only happens with certain jpegs (straight from my camera),
pictures that have been through gimp open perfectly.

# file ./dscf0216.jpg
./dscf0216.jpg: JPEG image data, EXIF standard 0.77, 42 x 0

this is the output from 'file' on the problem file.



Reproduce code:
---------------
$im = imagecreatefromjpeg("./dscf0216.jpg");

online here 

http://www.blueroot.net/~mike/wrc2003/test.php

Expected result:
----------------
Nothing (eg. no error)

Actual result:
--------------
Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0
(tried to allocate 6400 bytes) in
/home/mike/public_html/wrc2003/test.php on line 5


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26231&edit=1


Thread (4 messages)

« previous php.bugs (#55357) next »