|
-
Oct 25th, 2003, 06:36 PM
#1
Thread Starter
Stuck in the 80s
Installing the GD Library
I'm absolutely clueless as to how to do this. Any help?
-
Oct 25th, 2003, 07:43 PM
#2
Member
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.
-
Oct 25th, 2003, 10:18 PM
#3
Thread Starter
Stuck in the 80s
This may sound stupid...but I can't find my php.ini file.
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.
-
Oct 25th, 2003, 10:29 PM
#4
Thread Starter
Stuck in the 80s
Eh, well, I put another copy of php.ini in C:\WINDOWS, so hopefully I wont have a problem.
-
Oct 25th, 2003, 10:54 PM
#5
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.
-
Oct 26th, 2003, 08:55 AM
#6
Thread Starter
Stuck in the 80s
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?
-
Oct 26th, 2003, 10:32 PM
#7
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.
-
Oct 26th, 2003, 10:43 PM
#8
Thread Starter
Stuck in the 80s
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.
-
Oct 27th, 2003, 12:01 AM
#9
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..
PHP Code:
<?
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..
-
Oct 27th, 2003, 12:53 AM
#10
Thread Starter
Stuck in the 80s
I think I got my code working. Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|