Page 1 of 1
GD Library..
Posted: Mon Nov 08, 2004 1:56 pm
by teckyan888
Anyone who familiar with GD Library???
I set the Gd Library inside the php.in follow the instruction, but cannot display anything by using the example...
Anyone who know how to set it in my php??can show me step by step???
Thanks if anyone can help me...
Posted: Mon Nov 08, 2004 2:20 pm
by kettle_drum
Firsty of all what OS are you using? What version of php? have you compiled it yourself?
Posted: Mon Nov 08, 2004 2:49 pm
by teckyan888
Actually i already follow these step:
Go to the “php.ini” and under the “Dynamic Extensions “ you will see “extension_dir = c:/php/includes” and “extension=php_gd.dll” Uncomment the line (i.e. remove the ; before the line)and ensure that you have the “php_gd2.dll” in the specific directory.
Then,i go to the command or shell prompt Execute “php –m” and that “GD” module is found.
After that, i try example:
Code: Select all
<?php
$im = imagecreate (250, 28);
$black = ImageColorAllocate ($im, 0, 0, 0);
$yellow = ImageColorAllocate ($im, 235, 235, 51);
ImageTTFText ($im, 20, 0, 10, 20, $yellow, "/WINDOWS/Fonts/IMPACT.ttf",
"IMPACT FONT HIP HIP Hurray!!!");
ImagePNG($im);
?>
Then,it display this message:
[php_man]Fatal error: Call to undefined function: imagecreate() in C:\Program Files\Apache Group\Apache2\htdocs\cb359\test1.php on line 2
[/php_man]
So,can u help me see to see whether i forget to set up anything???
I used php 4.3.5 in windows XP....
Posted: Tue Nov 09, 2004 3:13 am
by phpScott
have you restarted your web server?
make sure that the gd2.dll is in the correct directory.
make a simple phpinfo page.
and see if you get the gd library listed on the page.
It is also a good place to see where the extensions directory is pointing too.