PDA

View Full Version : How About GD function in PHP ?


FreeShadow
01-28-2001, 06:10 AM
How About GD function in PHP ?

I try this:
$image = ImageCreate(1,1);

So i get this:

Fatal error: Call to undefined function: imagecreate() in /home/freeshad/public_html/cakFonction.php on line 3

So I try this:

$IsOk = dl("php_gd.dll");

And I get this:

Warning: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20001214/php_gd.dll' -
/usr/local/lib/php/extensions/no-debug-non-zts-20001214/php_gd.dll: cannot open shared object file: No such file or directory in
/home/freeshad/public_html/cakFonction.php on line 4


So How i can use the GD function ?

Thanks to all of you.

geeknik
01-29-2001, 01:35 PM
Looks like that library is not installed. Or if it is, it's not in the usual location. YOu might submit a ticket about it, and see if they can install and/or fix it. =)

Brian

Adam
02-22-2001, 09:08 AM
GD works fine for me.
Try this:
<?php
header ("Content-type: image/png");
$img = @ImageCreate (80, 25);
$bgcol = ImageColorAllocate ($img, 0, 0, 0);
$txtcol = ImageColorAllocate ($img, 200, 0, 100);
ImageString ($img, 5, 7, 4, "GD Test", $txtcol);
ImagePng ($img);
?>

Good luck
/Adam

FreeShadow
02-23-2001, 03:02 AM
Why did you put de '@' in front of ImageCreate ?

The '@' just hide de php error:
'Call to undefined function: imagecreate()'

So, i copied you php code and try it exactly like yours, but, like i was thinking, is'nt working !

Adam
02-23-2001, 10:43 AM
Ok, maybe you should try a Trouble Ticket then...
Sorry that I couldn't help you
/Adam