GD Library

Matthew Seaman m.seaman at infracaninophile.co.uk
Tue May 6 10:39:24 BST 2003


--lEGEL1/lMxI0MVQ2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, May 06, 2003 at 09:37:08AM +0100, Abdul Salam wrote:
> Hi there,
>=20
> 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=3D/usr/local' '--with-jpeg' '--with-zlib'
> '--with-apxs2=3D/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=20
    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

--=20
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

--lEGEL1/lMxI0MVQ2
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+t4LMdtESqEQa7a0RAre2AJ0bDP9qPzPI+wDXuhj2ZmseGPskigCfVGih
7AkIl1go7+qafOO41VZ/l4M=
=N+mO
-----END PGP SIGNATURE-----

--lEGEL1/lMxI0MVQ2--




More information about the Ukfreebsd mailing list