GD Library
Abdul Salam
abdul at netsite.co.uk
Tue May 6 11:27:47 BST 2003
Hi Matthew,
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?
Thanks once again.
-Abdul
-----Original Message-----
From: Matthew Seaman [mailto:m.seaman at infracaninophile.co.uk]
Sent: 06 May 2003 10:39
To: Abdul Salam
Cc: freebsd-users at uk.freebsd.org
Subject: Re: GD Library
On Tue, May 06, 2003 at 09:37:08AM +0100, Abdul Salam wrote:
> Hi there,
>
> I am not sure whether this is relevant to FreeBSD or PHP group. But,
> anyway please let me know if anybody else had come across with this
> issue before. I have an Apache installation on FreeBSD with PHP 4.2.3.
I
> want to enable GD library with it. By default PHP 4.2 should have a GD
> library with it. But, it was showing a version of 1.6.2. But, what I
> need is GD 2.x. In ports collection I have GD 2.1 and I installed it
and
> re-compiled it again by using "./configure' '--with-mysql'
> '--with-gd=/usr/local' '--with-jpeg' '--with-zlib'
> '--with-apxs2=/usr/local/www/bin/apxs' ". But, still it is showing
> version 1.6. So, I downloaded the latest version of GD library,
> installed it and compiled again. Still the version doesn't change.
Does
> anybody have any idea on what is happening here? Please note, I have
> only re-started apache, not the sever itself. I don't want to do that
as
> many websites are running on the machine. Any help will be
appreciated.
Doing an
apachectl restart
or
apachectl graceful
will be enough to get your new mod_php loaded. There's no need to
reboot the whole machine.
Hmmm... php will link against whichever version of libgd you have
installed. If you look at the configure.php script from the mod_php4
port, the only difference between the settings for the GD1 and GD2
options is the version number of the library dependency.
Check /usr/local/lib: if you have
libgd.so.2 --- that's GD 1.x
libgd.so.4 --- that's GD 2.x
and you should have a
libgd.so
as a symlink to whatever version is the default.
Note that the gd and gd2 ports are not mutually compatible, in that
there are a bunch of files installed by each port which they both
claim ownership of. It's the last one of the two that was installed
which wins out. Unfortunately, you've got to be alert when upgrading
your ports, as some packages depend on GD1 and will cause it to be
installed on top of your GD2 stuff *without any warning*. Or vice
versa.
pkg_info -I gd\*
will show you what libgd ports your system has installed. If you've
got both the gd and gd2 ports, then the best thing to do is delete
both of them and re-install just the one that you want:
pkg_delete -f graphics/gd
pkg_delete -f graphics/gd2
cd /usr/ports/graphics/gd2
make install
and then rebuild PHP and restart apache to load it. You may want to
investigate the mod_php4 port, which gets you PHP 4.3.1 as of this
writing, rather than hand building PHP.
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