php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17455 to View image
Submitted: 2002-05-27 10:38 UTC Modified: 2002-05-27 10:54 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: endeeuk at yahoo dot com Assigned:
Status: Closed Package: *Graphics related
PHP Version: 4.0CVS-2002-05-27 OS: Linux
Private report: No CVE-ID: None
 [2002-05-27 10:38 UTC] endeeuk at yahoo dot com
hi, All

This is small test for image.

<?php
$im = ImageCreate(200,200);
imagefill($im,1,1,1) ;
$bg = ImageColorAllocate($im,1,1,1);
$tx = ImageColorAllocate($im,25,28,28);
ImageFilledRectangle($im,0,0,180,180,$bg);
ImageString($im,3,70,90,"it works !",1);
if (function_exists("imagegif")) {
    header ("Content-type: image/gif");
    $a  = imagegif ($im);
}
elseif (function_exists("imagejpeg")) {
    header ("Content-type: image/jpeg");
    $a  = imagejpeg ($im, "", 0.5);
}
elseif (function_exists("imagepng")) {
    header ("Content-type: image/png");
    $a  = imagepng ($im);
}
elseif (function_exists("imagewbmp")) {
    header ("Content-type: image/vnd.wap.wbmp");
    $a  = imagewbmp ($im);
}
else
    die("No image support in this PHP server");

imagedestroy($im) ;

?>



This is my script : When I calling this script my Browser give me that error :


//////

The page cannot be displayed 
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings. 

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

Please try the following:

Click the  Refresh button, or try again later.

If you typed the page address in the Address bar, make sure that it is spelled correctly.

To check your connection settings, click the Tools menu, and then click Internet Options. On the Connections tab, click Settings. The settings should match those provided by your local area network (LAN) administrator or Internet service provider (ISP). 
If your Network Administrator has enabled it, Microsoft Windows can examine your network and automatically discover network connection settings.
If you would like Windows to try and discover them, 
click  Detect Network Settings 
Some sites require 128-bit connection security. Click the Help menu and then click About Internet Explorer to determine what strength security you have installed. 
If you are trying to reach a secure site, make sure your Security settings can support it. Click the Tools menu, and then click Internet Options. On the Advanced tab, scroll to the Security section and check settings for SSL 2.0, SSL 3.0, TLS 1.0, PCT 1.0. 
Click the  Back button to try another link. 



Cannot find server or DNS Error
Internet Explorer  



My PHP version is php3.0.11
GD is 1.3

But when I tried another script , it has no problem ??

Please help me

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-27 10:54 UTC] rasmus@php.net
Which versions of PHP and GD?  Is it really PHP3 and GD1.3?  If so, UPGRADE!  I tested your script on the current PHP 4.3/GD2 code and it worked just fine so I would assume whatever the problem was, it has been fixed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 14:01:29 2024 UTC