Hi,

I am running Apache 2.0 with PHP 4.2.11 on Windows XP.
I installed php_gd2.dll by uncommenting extension=php_gd2.dll and making sure 
that the file was in my extension_dir.
I restarted Apache and didn't get an error, so assumed it was working.
When I run my example code:

<?php
$im = imagecreatetruecolor (300, 200); 
$black = imagecolorallocate ($im, 0, 0, 0); 
$white = imagecolorallocate ($im, 255, 255, 255); 
imagefilledrectangle($im,0,0,399,99,$white); 
imagerectangle($im,20,20,250,190,$black); 
header ("Content-type: image/png"); 
imagepng ($im);
?>

I get the following error:

Fatal error: Call to undefined function: imagecreatetruecolor() in 
imagetest.php on line 2

This code works on other servers, so where have I gone wrong in my installation 
of GD?

Thanks in advance,

Ross

Reply via email to