php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43675 imagecreatefromjpeg error
Submitted: 2007-12-26 00:49 UTC Modified: 2007-12-26 11:18 UTC
From: xfreelancer at yahoo dot com Assigned: pajoye (profile)
Status: Not a bug Package: GD related
PHP Version: 5.2.5 OS: CentOS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: xfreelancer at yahoo dot com
New email:
PHP Version: OS:

 

 [2007-12-26 00:49 UTC] xfreelancer at yahoo dot com
Description:
------------
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to
allocate 26320 bytes) in /home/test.php on line 4

Reproduce code:
---------------
$ims=imagecreatefromjpeg("90-9bb2.jpg");


Expected result:
----------------
$ims should contain the jpg photo.

Actual result:
--------------
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to
allocate 26320 bytes) in /home/test.php on line 4


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-26 00:49 UTC] xfreelancer at yahoo dot com
I already increased the memory_limit to 128M.

The result:
"Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 26320 bytes)"

However, it is not normal to receive such an error in case of a ~1mb photo.

The only code is $ims=imagecreatefromjpeg($path);

Where can I send the file with the photo for more debug ?
 [2007-12-26 00:52 UTC] xfreelancer at yahoo dot com
This was already submited as:
"Bug #43653 imagecreatefromjpeg error "
but pajoye@php.net considered it is a bogus report.

It is not bogus. It is clearly using 32Mb (actually whatever you will use, I tried even 256Mb) only to createfromjpeg a simple photo, which is not correct.
There is no reason to use so much memory just for that operation.
Also, I believe that using 128mb I should open ANY jpg image of ~1Mb.

Or not ? :(
 [2007-12-26 00:53 UTC] xfreelancer at yahoo dot com
"It is clearly using 32Mb" actualy is "It is clearly trying to use MORE than 32Mb"

Thank you.
 [2007-12-26 00:53 UTC] xfreelancer at yahoo dot com
The same behaviour for 5.2.4 version.
I will test it with more versions.
 [2007-12-26 11:16 UTC] pajoye@php.net
"The same behaviour for 5.2.4 version. I will test it with more versions."

I gave you _ALL_ information you need to solve your problem in the other bug report. Much more than we are supposed to do while solving a bug report.

Please read carefully the documentation or contact one of the numerous support channel we offer (bugs.php.net is not a support channel). 

To be read: http://de2.php.net/manual/en/ini.core.php

 [2007-12-26 11:18 UTC] pajoye@php.net
"I should open ANY jpg image of ~1Mb"

let say you have a 1024x768 JPEG image, the image buffer alone will use 7MB in memory, php and your script will also use some memory. Please try to understand what you are doing and then reopen a bug if you still consider it as a bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 20:01:29 2024 UTC