php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24690 Image-bug in PHP
Submitted: 2003-07-17 06:15 UTC Modified: 2003-07-19 07:54 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: peteralien2003 at yahoo dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.3.2 OS: Win XP Pro
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: peteralien2003 at yahoo dot com
New email:
PHP Version: OS:

 

 [2003-07-17 06:15 UTC] peteralien2003 at yahoo dot com
Description:
------------
I have:

Win XP Pro
IIS 5.1
PHP 4.3.2
GD 2.0.12

Reproduce code:
---------------
<?
  Header("Content-type: image/png");
  $img = ImageCreate(115,55);
  $ip = $_SERVER['REMOTE_ADDR'];
  $alt = "(c) 2003 Peter Alien";
  //ImageColorTransparent($img,$bgcolor);
  $bgColor = ImageColorAllocate($img, 0x2c,0x6D,0xAF); // blue
  $shadow = ImageColorAllocate($img, 84,84,84);    // gray
  $textColor = ImageColorAllocate($img, 0,0,0);       // black
  $white = ImageColorAllocate($img, 255,255,255);     //left upper corner
  ImageRectangle($img,0,0,115-1,55-1,$shadow);  //shadow effect
  ImageRectangle($img,0,0,115,55,$white);
  ImageTTFText($img,10,0,5,20,$shadow,"times.ttf","$ip\n\r$alt"); // text shadow effect
  ImageTTFText($img,10,0,4,19,$textColor,"times.ttf","$ip\n\r$alt"); // text color
  //ImageJpeg($img);
  ImagePng($img);
  ImageDestroy($img);
?>

Expected result:
----------------
It was supposed to appear an image with the IP of the machine in the browser.

Actual result:
--------------
Sometimes appears an image but other times it just appears the placehold of it, even when i refresh the browser.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-17 22:00 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Can not reproduce. There might be errors during the
script execution but you won't see them if you output
the image on browser. Try this script:

<?php

error_reporting(E_ALL);
$img = ImageCreate(115,55);
$ip = '192.168.0.1';
$alt = "(c) 2003 Peter Alien";
$bgColor = ImageColorAllocate($img, 0x2c,0x6D,0xAF); 
$shadow = ImageColorAllocate($img, 84,84,84);   
$textColor = ImageColorAllocate($img, 0,0,0); 
$white = ImageColorAllocate($img, 255,255,255);
ImageRectangle($img,0,0,115-1,55-1,$shadow);
ImageRectangle($img,0,0,115,55,$white);
ImageTTFText($img,10,0,5,20,$shadow,"times.ttf","$ip\n\r$alt");   
ImageTTFText($img,10,0,4,19,$textColor,"times.ttf","$ip\n\r$alt");   
ImagePng($img, "foo.png");
ImageDestroy($img);

?>

 [2003-07-18 11:13 UTC] peteralien2003 at yahoo dot com
Nope it stays the same and doesn?t give me any report of errors !
 [2003-07-18 11:26 UTC] peteralien2003 at yahoo dot com
the situation is this:

i browse the php file in IIS, and it appears the image in IE6.
i close the browser.
i browse the php file again in IIS, and it just appears the image placehold.
i refresh the browser again and again and nothing, just appears the image placehold.

this happends because the php file is in the cache of the IE6 ?

by the way i have the PHP 4.3.2 how can i update to the version that you gave me, i think it's the 4.3.3-RC2.
 [2003-07-19 07:54 UTC] sniper@php.net
It's just that cache issue. Try clear the cache.
Not PHP bug.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Aug 28 19:00:03 2025 UTC