Re: gd-lib and libjpeg issues

From: Date: Thu, 15 Nov 2001 04:40:39 +0000
Subject: Re: gd-lib and libjpeg issues
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74664@lists.php.net to get a copy of this message
On Thu, 15 Nov 2001 05:29, Bill Brennick wrote: > Hi all... Having an issue with PHP recognizing the libgd and libjpeg > libraries... I specifically downloaded the newest version(s) of those, > and compiled the PHP 4.0.6 with: > > ./configure --with-mysql=/usr/local/mysql > --with-apache=../apache_1.3.22 --with-xml --with-zlib > --with-gd=/usr/lib --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib > > > However, I still keep getting the following message everytime I use > an app that uses GD (For example, jpgraph) > > "Your PHP (and GD-lib) installation does not appear to support any > known graphic formats.You need to first make sure GD is compiled as a > module to PHP. If you also want to use JPEG images you must get the > JPEG library. Please see the PHP docs for details." > > Have looked into everything: php.ini's, apache config's, etc... > > At a loss... > > Thanks... > - Bill Rasmus posted this suggesation a while back - it worked for me. > Has anyone got PHP successfully compiled and using GD 2.0.1? > > If so what was your configure line please and any other changes you had to > make in order to get PHP to compile. Thanks. Build gd-2.0.1 with these two lines in your GD2 Makefile: CFLAGS=-g -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm Don't install the lib anywhere, just leave them in the gd-2.0.1 directory. Then build PHP using: --with-gd=/home/<your_dir>/gd-2.0.1 --with-freetype-dir=/usr --enable-gd-native-ttf (note there was a typo in 4.0.6 on this one) use: --enable-gd-native-tt if you are using 4.0.6 --enable-gd-imgstrttf --with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 This assumes that you have freetype2 installed along with the libjpeg and libpng libs under /usr -Rasmus Keep an eye on the output of configure as sometimes you'll see messages in there about the image libs - but the absence of same even if specified doesn't seem to crash the compilation. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA And now for something completely the same...

« previous php.general (#74664) next »