[lug] Quick Fix for PHP/MySQL Undefined Function Problem?

Jeff Schroeder jeff at neobox.net
Tue Aug 31 11:20:39 MDT 2004


Bill:

> However, I forgot
> to mention that I built PHP and MySQL from source, and I may have
> doen something different in the switches.

Yeah, newer versions of PHP require you to specifically include MySQL 
support (it used to be turned on by default, IIRC).  So in your 
'configure' line you'll need to add

--with-mysql=/usr/local

appropriate to wherever your MySQL libraries are installed.

> I have that one on both machines in /usr/lib/httpd/modules/.

An easy check (other than phpinfo() which will tell you about MySQL 
support) would be to see if libphp4.so links to libmysqlclient.so:

# ldd /usr/lib/httpd/modules/libphp4.so

(blah blah blah)
libmysqlclient.so.12 => /usr/local/lib/mysql/libmysqlclient.so.12

Good luck!

Jeff



More information about the LUG mailing list