Click to See Complete Forum and Search --> : Installing the GD Library
The Hobo
Oct 25th, 2003, 06:36 PM
I'm absolutely clueless as to how to do this. Any help? :(
Chroder
Oct 25th, 2003, 07:43 PM
Mabe this link will be helpful: http://php.weblogs.com/php_gd
Unzip the file php_gd_gif.dll and rename to php_gd.dll. Copy to your extensions directory, update your PHP.ini file to extension=php_gd.dll.
The Hobo
Oct 25th, 2003, 10:18 PM
This may sound stupid...but I can't find my php.ini file. :confused:
I thought I put it in my C:\WINDOWS directory, but it's not there.
I searched for it, and the search returned nothing.
Yet PHP runs, fine. :confused:
The Hobo
Oct 25th, 2003, 10:29 PM
Eh, well, I put another copy of php.ini in C:\WINDOWS, so hopefully I wont have a problem.
kows
Oct 25th, 2003, 10:54 PM
If you don't have your PHP INI file installed correctly, PHP just runs off of the default settings. I don't have anything to change in it, so I don't even use it.
The Hobo
Oct 26th, 2003, 07:55 AM
Ah. Maybe when I installed XP I just forgot to add it to the Windows directory. I probably thought "It works...I must be done!" And didn't even think about the .ini.
I'm still confused as to how to get this working. That link was for PHP 4.0 and I don't think it was version 2 of the GD library.
Do I have to download it from their site and build it myself?
kows
Oct 26th, 2003, 09:32 PM
PHP should already come with it.. I don't know which version PHP is on right now, but the version I have (4.3.1 I think) came with GD 2.0 as far as I know.
you shouldn't have to do anything to make it work, and the most you should have to do is uncomment the GD library entry in your PHP INI.
The Hobo
Oct 26th, 2003, 09:43 PM
I was running 4.3.1 or something like that, and I didn't have the GD library. I uncommented the line, but it didn't work. the php_gd2.dll wasn't even on my computer.
So I downloaded 4.3.3 and installed it...still, no GDI library.
I was downloading the windows installer, so I decided to download the zip. The php_gd2.dll file was in there, so I unziped that file and put it in a php/extensions directory and changed my extensions directory to that in the ini and it works.
Now I can't figure out how to use the friggin' functions. I get no errors, but I also get no images. :(
kows
Oct 26th, 2003, 11:01 PM
yeah, i've never downloaded the installer.. just the zip.
post some code of what you're doing.. or, here, i'll just give you some that i know works, to see if it works at all..
<?
Header("Content-type: image/png");
$image = imageCreate(100,40);
$white = imageColorAllocate($image,255,255,255);
$black = imageColorAllocate($image,0,0,0);
imageFilledRectangle($image, 0, 0, 100, 40, $white);
$font = "verdana.TTF";
$text = "test";
imagettftext ($image, 20, 0, 15, 33, $black, $font, $text);
imagePNG($image);
imageDestroy($image);
?>
just move verdana.ttf into that folder the script is in..
The Hobo
Oct 26th, 2003, 11:53 PM
I think I got my code working. :confused: Thanks.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.