Page 1 of 1

Help with GD and PHP

Posted: Mon May 13, 2002 12:05 pm
by Johnm
Can anyone help me with the install and configuration of GD 1.8.

Posted: Mon May 13, 2002 12:34 pm
by chiefmonkey
What are you installing it onto WIN or Linux

George

Posted: Mon May 13, 2002 12:46 pm
by Johnm
Unix. SGI Irix 6.5, PHP 4.04pl1, Apache 1.3.17.

Posted: Mon May 13, 2002 1:15 pm
by chiefmonkey
Ok,
I have put it on my Linux box quite a few times this is how I do it

You will need to recompile PHP with GD support, might be the time to upgrade your PHP version as well

For GD to install properly and to use it fully you need to install a few other packages

1. Zlib

Unpack the Zlib source and cd to the directory and type
./configure --shared
then make and make install

2 Libpng

Unpack the libpng source cd to the directory and copy the makefile which relates to your system from the scripts folder to the top level folder
cp scripts/makefile.std makefile
then run make install

3 libJpeg

Unpack the source cd to the directory and then run ./configure --enable-shared then make and make install


4 Freetype

Unpack the source and run
./configure --enable-shared
--x-includes=/usr/X11R6/include
--x-libraries=/usr/X11R6/lib
then run make and then make install

Finally unpack GD and run make and then make install

Next you need to recompile PHP with the following flags

--with-jpeg-dir
--with-png-dir
--with-freetype=/path/tofreetype/dir
--with-gd=/path/togd/folder
--enable-gd-native-ttf
[other compile options]

HTH

George

Posted: Mon May 13, 2002 3:24 pm
by Johnm
Here is what I get every time I try to run make:
Any ideas?

ld: WARNING 84 : /usr/lib/libm.so is not used for resolving any symbol.
ld: WARNING 84 : /usr/local/lib/libintl.a is not used for resolving any symbol.
ld: WARNING 84 : /usr/local/lib/libintl.a is not used for resolving any symbol.
creating ftstrtto
cd po; make all
make: file `Makefile' line 95: Syntax error
*** Error code 1 (bu21)
[rnd15]freetype-1.3 79% grep "/usr/local/lib/" *
configure: /usr/local/lib/X11 \
configure: /usr/local/lib/X11R6 \
configure: /usr/local/lib/X11R5 \
configure: /usr/local/lib/X11R4 \

Posted: Tue May 14, 2002 3:56 pm
by chiefmonkey
Have you looked at the install log to see what it says.

George