Compiling/using GD

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
CGameProgrammer
Forum Newbie
Posts: 11
Joined: Sun Mar 09, 2003 11:26 pm

Compiling/using GD

Post by CGameProgrammer »

I downloaded PHP-Triad so I can write and run code locally on my machine (Windows). Apparently it doesn't come with GD (doesn't appear on phpinfo() even though php_gd.dll is included) so I guess I need to download and compile it myself.

However, the code does not work. gd.c alone gives me 35 warnings, including using the integer-function abs() on floats, which will of course round the float and produce incorrect results. Horrible code. I'm using VC++ 6.0 by the way.

So my question is, how can I get GD working?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

open your php.ini and search for the line
;extension=php_gd.dll
remove the ; to enable the gd-extension. If there is no such line add it (after extension_dir if there is no single line extension=...)
in case you can't find your php.ini

Code: Select all

<?php phpinfo(); ?>
will tell you.
e.g.

Code: Select all

System			Windows NT localhost 5.0 build 2195
Build			Date Feb 15 2003 23:02:25
Server			API Apache
Virtual			Directory Support enabled
Configuration File (php.ini) Path	C:\WINNT\php.ini
Post Reply