php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27112 Problem with GD in php
Submitted: 2004-02-01 02:00 UTC Modified: 2004-02-01 06:33 UTC
From: mankaho at lskcf5d dot net Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.3.3 OS: Linux Mandrake
Private report: No CVE-ID: None
 [2004-02-01 02:00 UTC] mankaho at lskcf5d dot net
Description:
------------
I  use a GD in PHP: PHP Version 4.3.3
I get an error with can't allocate memory ....
PHPconfig:
http://expt.lskc.edu.hk/~l99534/info.php

Reproduce code:
---------------
<? 

header("Content-type: image/jpeg"); 

$im_in = imagecreatefromjpeg("1.jpg"); 

$im_out = imagecreatetruecolor(1024,768); 

imagecopyresized($im_out,$im_in,0,0,0,0,800,600,1024,768); 


imagejpeg($im_out); 
imagedestory($im_out); 
?> 


Expected result:
----------------
I smaller photo will be generated.. on web browser

Actual result:
--------------
Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 4096 bytes) in /var/www/html/2003/5d/test/test.php on line 7 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-01 04:30 UTC] pajoye@php.net
See the manual about the configuration directive and the memory limit.
 [2004-02-01 06:03 UTC] mankaho at lskcf5d dot net
Is is the php.ini or apache2 problem?

Which file should i config ..
?The pgp.ini or httpd.?
 [2004-02-01 06:33 UTC] pajoye@php.net
It's php.ini. Other questions should be posted on the php general list.

hth

pierre
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Dec 04 17:00:01 2025 UTC