GD Library
Abdul Salam
abdul at netsite.co.uk
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
command
./libphp4.so:
libmysqlclient.so.10 =>
/usr/local/lib/mysql/libmysqlclient.so.10 (0x28259000)
libgd.so.4 => /usr/local/lib/libgd.so.4 (0x28277000)
libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x282c4000)
libm.so.2 => /usr/lib/libm.so.2 (0x282dd000)
libc.so.5 => /usr/lib/libc.so.5 (0x2806c000)
libz.so.2 => /usr/lib/libz.so.2 (0x282fa000)
libpng.so.5 => /usr/local/lib/libpng.so.5 (0x28308000)
libjpeg.so.9 => /usr/local/lib/libjpeg.so.9 (0x2832d000)
libfreetype.so.9 => /usr/local/lib/libfreetype.so.9 (0x2834a000)
libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x28399000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x283a7000)
which clearly says gd is linked to libgd.so.4 (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
libgd.so to libgd.so.4. Still the issue remains same.
Many thanks,
-Abdul
-----Original Message-----
From: Matthew Seaman [mailto:m.seaman at infracaninophile.co.uk]
Sent: 06 May 2003 12:02
To: Abdul Salam
Cc: freebsd-users at uk.freebsd.org
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
the
> latest version of GD. By pkg_info command I am getting 2.0.1.3 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
the
> 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
manually
> in Makefile. One more thing I have noticed is my libgd.so is linked to
> libgd.so.2 rather than libgd.so.4. Manually re-linking of this to
> libgd.so.4 will do the trick..?. Or this needs to be done in some
other
> way?
Yes --- if libgd.so is sym-linked to libgd.so.2 then you'll end up
building PHP against GD 1.x. You should make the link point at
libgd.so.4 to achieve what you want:
# cd /usr/local/lib
# rm libgd.so
# ln -s libgd.so.4 libgd.so
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 ./libphp4.so
./libphp4.so:
libmysqlclient.so.10 =>
/usr/local/lib/mysql/libmysqlclient.so.10 (0x28245000)
libgd.so.4 => /usr/local/lib/libgd.so.4 (0x2827b000)
libfreetype.so.9 => /usr/local/lib/libfreetype.so.9
(0x282c9000)
libpng.so.5 => /usr/local/lib/libpng.so.5 (0x2831a000)
libz.so.2 => /usr/lib/libz.so.2 (0x2833d000)
libjpeg.so.9 => /usr/local/lib/libjpeg.so.9 (0x2834b000)
libbz2.so.1 => /usr/lib/libbz2.so.1 (0x28369000)
libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28379000)
libm.so.2 => /usr/lib/libm.so.2 (0x28392000)
libc.so.4 => /usr/lib/libc.so.4 (0x28069000)
libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x283ae000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x283bc000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x2847a000)
libXThrStub.so.6 => /usr/X11R6/lib/libXThrStub.so.6
(0x28488000)
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey 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 netsite.co.uk.
More information about the Ukfreebsd
mailing list