Hi there - I was forced into an "upgrade" from php 4.3.8 to 5.2.5 today. We have a bunch of pages that employ the imagecreatefromgif function, and none of these are working since the move to php5. These page, highly dumbed down, are all as follows: ************************* <?php header ("Content-type: image/png"); $im = imagecreatefromgif("http://www.mydomain.com/images/myimage.gif"); imagepng ($im); ?> ************************* Assuming that the page is called "testimage.php", when browsed to the page simply renders a broken image of property "testimage.php" I can confirm that the image "http://www.mydomain.com/images/myimage.gif" exists. There must be something fundamental missing from my php5 installation. Here's hoping that somebody can point me in the right direction. Thanks!
And the following test, taken from elsewhere, also just renders a broken image: ************************************ <?php function LoadGif ($imgname) { $im = @imagecreatefromgif ($imgname); /* Attempt to open */ if (!$im) { /* See if it failed */ $im = imagecreatetruecolor (150, 30); /* Create a blank image */ $bgc = imagecolorallocate ($im, 255, 255, 255); $tc = imagecolorallocate ($im, 0, 0, 0); imagefilledrectangle ($im, 0, 0, 150, 30, $bgc); /* Output an errmsg */ imagestring ($im, 1, 5, 5, "Error loading $imgname", $tc); } return $im; } header("Content-Type: image/gif"); $img = LoadGif("bogus.image"); imagegif($img); ?>