Date: Mon, 16 Feb 2004 20:14:39 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: freebsd-newbies@freebsd.org, freebsd-questions@freebsd.org Subject: Re: phpMyAdmin not loading MySQL extensions Message-ID: <20040216201439.GA95204@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20040216183128.GA4019@hijra.homeunix.com> References: <20040216183128.GA4019@hijra.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Feb 16, 2004 at 12:31:28PM -0600, Tweax Daemon wrote:
> =20
> I'm having trouble configuring phpMyAdmin. I guess from when I try to vi=
ew it
> in a browser I get the message unable to load mysql extensions the msql l=
ink
> re-directs me to the phpmyadmin site where its states about it can't load
> mysql.so which is on my system I tried placing it in the same directory =
but
> that didn't work. Changing many things in the config.inc.php file but I s=
till
> get the same error. Has anyone been successful at getting phpMyAdmin to =
work on
> FreeBSD 4.8, if so please info me=20
Works fine for me. I assume you have compiled up php with the mysql
support included? It's in the default configuration, so it should be
there even if you've installed packages from the FTP sites. In any
case, look at the output of the phpinfo() function to verify that you
have compiled it with all of the right options:
% /usr/local/bin/php << EOF | grep MySQL
? <? phpinfo() ?>
? EOF
MySQL Support =3D> enabled
Now it does sound as if you don't have libmysqlclient.so on your
library search path. Try running these commands and compare the
output to what I get:
% ldd /usr/local/libexec/apache/libphp4.so | grep mysql=20
libmysqlclient.so.12 =3D> /usr/local/lib/mysql/libmysqlclient.s=
o.12 (0x28608000)
% ldconfig -r | grep mysql
search directories: /usr/lib:/usr/lib/compat:/usr/X11R6/lib:/us=
r/local/lib:/usr/local/lib/mysql:/usr/local/lib/compat/pkg:/usr/local/lib/p=
th
166:-lmysqlclient_r.12 =3D> /usr/local/lib/mysql/libmysqlclient=
_r.so.12
167:-lmysqlclient.12 =3D> /usr/local/lib/mysql/libmysqlclient.s=
o.12
At a guess the problem is that you don't have '/usr/local/lib/mysql'
on your shared library search path. You can fix that (as a one-off)
by:
# ldconfig -m /usr/local/lib/mysql
after which the ldd(1) and ldconfig(8) commands above should show
libmysqlclient.so being correctly located. Then restart apache:
# apachectl graceful
and the PHP module should pick up the required MySQL stuff.
Don't worry if the .so version number on your system is different --
I'm running mysql-4.0.18 which implies libmysqlclient.so.12. Other
MySQL versions will be different.
You can preserve the ldconfig setup, or rather recreate it on each
reboot, by putting:
ldconfig_paths=3D"/usr/lib/compat /usr/X11R6/lib /usr/local/lib /usr/lo=
cal/lib/mysql"
into /etc/rc.conf.
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
--RnlQjJ0d97Da+TV1
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)
iD8DBQFAMSSvdtESqEQa7a0RAvWAAJsEabh5S3Me558u0ekUvZjZkmvQ+wCeMFEI
bkvwaSt3EgorcL0kNVQEwEc=
=nxs9
-----END PGP SIGNATURE-----
--RnlQjJ0d97Da+TV1--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040216201439.GA95204>
