php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17526 ImageCreate() is not working properly in php 4.2.1.
Submitted: 2002-05-30 09:54 UTC Modified: 2002-05-30 10:49 UTC
From: nicke at nicke dot nu Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.2.1 OS: Linux 2.4.18
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nicke at nicke dot nu
New email:
PHP Version: OS:

 

 [2002-05-30 09:54 UTC] nicke at nicke dot nu
This worked just fine in version 4.1.2. There is just an broken image on the webpage.

Here is the code i'm using.

<?
Header ("Content-type: image/jpeg");
$im = ImageCreate(800,70) or die ("Cannot initialize GD library");
$white = ImageColorAllocate ($im, 255, 255, 255);
$blue = ImageColorAllocate ($im, 48, 100, 152);
ImageTTFText ($im, 42, 0, 0, 58, $blue, "/usr/share/fonts/ttf/verdana.ttf", "$agitext");
ImageJpeg ($im, "", 95) or die ("Cannot create image");
$filepath ="./agi";
$filename = "agi.jpg";
ImageJpeg ($im, "$filepath/$filename", 95);
ImageDestroy ($im);
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-30 10:49 UTC] sniper@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.

Check the error_log for the reason why it's broken. This is not related to GD at all.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Dec 24 15:00:01 2025 UTC