GD Library

Abdul Salam abdul at
Tue May 6 12:43:24 BST 2003

Hi Matthew,

Thanks once again. ldd command was new to me and it is a really useful
one. But, I still couldn't solve the issue. Here is the output of my ldd

./ =>
/usr/local/lib/mysql/ (0x28259000) => /usr/local/lib/ (0x28277000) => /usr/lib/ (0x282c4000) => /usr/lib/ (0x282dd000) => /usr/lib/ (0x2806c000) => /usr/lib/ (0x282fa000) => /usr/local/lib/ (0x28308000) => /usr/local/lib/ (0x2832d000) => /usr/local/lib/ (0x2834a000) => /usr/X11R6/lib/ (0x28399000) => /usr/X11R6/lib/ (0x283a7000)

which clearly says gd is linked to (viz. GD2.x). But,
phpinfo() and gd_info() commands of php shows the installed version is
1.6.2. Here is my gd_info() output 

array(9) { 
["GD Version"]=> string(15) "1.6.2 or higher" 
["FreeType Support"]=> bool(false) 
["T1Lib Support"]=> bool(false) 
["GIF Read Support"]=> bool(true) 
["GIF Create Support"]=> bool(false) 
["JPG Support"]=> bool(true) 
["PNG Support"]=> bool(true) 
["WBMP Support"]=> bool(true) 
["XBM Support"]=> bool(false) 

Which says the installed version is 1.6.2. I have installed GD from
ports collection and php manually (To get the latest version 4.3.1). I
don't know whether this makes any difference. Now, I have re-linked my to Still the issue remains same.

Many thanks,


-----Original Message-----
From: Matthew Seaman [mailto:m.seaman at] 
Sent: 06 May 2003 12:02
To: Abdul Salam
Cc: freebsd-users at
Subject: Re: GD Library

On Tue, May 06, 2003 at 11:27:47AM +0100, Abdul Salam wrote:

> Thank you for that. But, I am still having trouble linking my PHP to
> latest version of GD. By pkg_info command I am getting as the
> installed version of gd. But, in PHP I am getting version 1.6.2. It
> sounds like PHP is not linking with the latest version of the GD on
> server. I have re-compiled with "--without-gd --with-gd=/usr/local"
> option to avoid taking the default library. But, it is failing to
> compile. Looks like my Makefile is looking in a wrong location for
> libraries. I am not sure whether it is a good idea to change it
> in Makefile. One more thing I have noticed is my is linked to
> rather than Manually re-linking of this to
> will do the trick..?. Or this needs to be done in some
> way?

Yes --- if is sym-linked to then you'll end up
building PHP against GD 1.x.  You should make the link point at to achieve what you want:

    # cd /usr/local/lib
    # rm
    # ln -s

Then rebuild, reinstall PHP and restart apache as before.

Another handy command is 'ldd' which will tell you exactly what shlibs
your PHP module is linking against:

    % cd /usr/local/libexec/apache
    % ldd ./
/usr/local/lib/mysql/ (0x28245000)
   => /usr/local/lib/ (0x2827b000)
   => /usr/local/lib/
   => /usr/local/lib/ (0x2831a000)
   => /usr/lib/ (0x2833d000)
   => /usr/local/lib/ (0x2834b000)
   => /usr/lib/ (0x28369000)
   => /usr/lib/ (0x28379000)
   => /usr/lib/ (0x28392000)
   => /usr/lib/ (0x28069000)
   => /usr/X11R6/lib/ (0x283ae000)
   => /usr/X11R6/lib/ (0x283bc000)
   => /usr/X11R6/lib/ (0x2847a000)
   => /usr/X11R6/lib/



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP:         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

Mail and any attachments checked for known 
viruses by Netsite Anti-Virus System.
If you have any comments regarding this policy 
please direct them to postmaster at

More information about the Ukfreebsd mailing list