imageCreate() error
| From: | Ed | Date: | Thu, 16 Jan 2003 05:30:38 +0000 |
| Subject: | imageCreate() error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-131902@lists.php.net to get a copy of this message | ||
I'm running PHP 4.3 and W2k with IIS 5.0. I have enabled php_gd and it does
show up when I do a phpinfo. The php_gd.dll is in the winnt/system32
directory (I've also tried it in almost every other directory too) and I get
these error messages:
Cannot add header information - headers already sent by (output started at
C:\Inetpub\wwwroot\template\index.php:1) in
C:\Inetpub\wwwroot\template\index.php</b> on line 3
Fatal error: Call to undefined function: imagecreate() in
C:\Inetpub\wwwroot\template\index.php on line 4
Here's the code:
<?php
header("Content-type: image/png");
$im = imagecreate(100, 20);
$red = imagecolorallocate($im, 255, 0, 0);
$white = imagecolorallocate($im, 255, 255, 255);
$ImageString($im, 3, 3, 3, "Home", $white);
imagepng($im);
ImagegDestroy($im);
?>
Any help would be appreciated.