Page 1 of 1

Compiling/using GD

Posted: Wed Mar 12, 2003 4:57 pm
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?

Posted: Thu Mar 13, 2003 2:05 am
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