|
Posted by alfred.ayache on 08/08/06 16:21
I've found a problem with many of my PHP installations. I'm not sure
whether it's a PHP problem, or an Apache problem, or something else
again.
The issue appears when we try to use the following snippet from the PHP
docs for imagecreate():
<?php
header("Content-type: image/png");
$im = @imagecreate(100, 50)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 255, 255, 255);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
imagepng($im);
imagedestroy($im);
?>
This brings up an empty page. FF Page Info shows a 0px x 0px png. I'm
using Win2K on 2 of my 3 machines. On the 3rd, XP machine I'm using
xampp which uses Apache 2, and it works on that one.
Currently trying to install xampp on my main workstation (win2k), but
can't get existing port 80 server cleared... That's another issue.
Anyone have similar problems with GD2 in PHP?
Thanks,
- AAA
[Back to original message]
|