Help with GD and PHP

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
User avatar
Johnm
Forum Contributor
Posts: 344
Joined: Mon May 13, 2002 12:05 pm
Location: Michigan, USA
Contact:

Help with GD and PHP

Post by Johnm »

Can anyone help me with the install and configuration of GD 1.8.
User avatar
chiefmonkey
Forum Commoner
Posts: 25
Joined: Sat Apr 20, 2002 5:21 am
Location: Glasgow UK

Post by chiefmonkey »

What are you installing it onto WIN or Linux

George
User avatar
Johnm
Forum Contributor
Posts: 344
Joined: Mon May 13, 2002 12:05 pm
Location: Michigan, USA
Contact:

Post by Johnm »

Unix. SGI Irix 6.5, PHP 4.04pl1, Apache 1.3.17.
User avatar
chiefmonkey
Forum Commoner
Posts: 25
Joined: Sat Apr 20, 2002 5:21 am
Location: Glasgow UK

Post 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
User avatar
Johnm
Forum Contributor
Posts: 344
Joined: Mon May 13, 2002 12:05 pm
Location: Michigan, USA
Contact:

Post 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 \
User avatar
chiefmonkey
Forum Commoner
Posts: 25
Joined: Sat Apr 20, 2002 5:21 am
Location: Glasgow UK

Post by chiefmonkey »

Have you looked at the install log to see what it says.

George
Post Reply