gd library

DCT Jared Smith jared at dctkc.com
Fri Jun 7 11:07:29 CDT 2002


Both of these refer to .gifs, but are details on building 
graphs with PHP.

http://www.phpbuilder.com/columns/allan20000830.php3
http://www.phpbuilder.com/columns/wiesendanger20001218.php3

And here is confirmation of your hunch that zlib and libpng
need to be installed, from the GD site:

http://www.boutell.com/gd/manual1.8.4.html
-----------------------------------------------------------------
gd 1.8.4 requires that the following libraries also be installed: 

libpng (see the libpng home page) 

zlib (see the info-zip home page) zlib 

jpeg-6b or later, if desired (see the Independent JPEG Group home 
page) 

If you want to use the TrueType font support, you must also install 
the FreeType 2.x library, including the header files. See the 
Freetype Home Page, or SourceForge. No, I cannot explain why that 
site is down on a particular day, and no, I can't send you a copy. 
------------------------------------------------------------------

And finally, here's what Rasmus Lerdorf has to say:

http://www.php.net/~rasmus/gd.html

GD-2.0.1 and PHP

0. Make sure you have libjpeg and libpng installed
1. Grab GD-2.0.1.
2. tar zxvf gd-2.0.1.tar.gz
3. cd gd-2.0.1
4. Edit the Makefile and change the LIBS line to be:
     LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm
5. make libgd.a   (don't need to do a make install)
6. Now build PHP using these flags:
   --with-gd=/home/<you>/gd-2.0.1
   --with-freetype-dir=/usr
   --enable-gd-native-ttf  (for PHP 4.0.6 leave off trailing 'f')
   --enable-gd-imgstrttf
   --with-jpeg-dir=/usr
   --with-png-dir=/usr
   --with-zlib

-jds




More information about the Kclug mailing list