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

Bill Thoen bthoen at gisnet.com
Tue Aug 31 11:46:41 MDT 2004


On Tue, 31 Aug 2004, Jeff Schroeder wrote:

> 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

Oddly enough, on the machine where PHP works with MySQL, the "configure 
command" results from  phpinfo() doesn't mention this. However, there is a 
MySQL section listed with phpinfo() on that machine. On my production 
machine, there is a very large "configure command" returned from 
phpinfo(), and no MySQL section. Also, libphp4.so does not link to 
libmysqlclient.so.12.

I'm beginning to remember what happened now (it was a couple of months ago
that I first tried to set up PHP & MySQL on my production server and got
them to work, but not together.) I think I finally ran up agaimst having
to rebuild Apache, along with PHP and MySQL on my production machine and
just didn't want to deal with potentially trashing a working server. I
think now that the PHP on my production machine is probably an rpm...
yeah, just checked; it is.

Okay, so my next question is, can I just copy the PHP files (including
libphp4.so) from my test machine onto my production machine, or are these
things so intertwingled between Apache, PHP and MySQL that I'm just going
to make a mess? I discovered that when I rebuilt Apache on my test machine
that it didn't put the files in the same places that the RedHat rpm does
(RH seems to put things all over the place) and so I'm wondering if RH's
PHP rpm tucks files all over the disk too?

Maybe what I'll do is just set up my test machine as the production server 
while I tear up the other one seeing what I can break...

Admin'ing your own systems when you're clueless is not just a job;  it's
an adventure!  Guess that's how you learn...

- Bill Thoen




More information about the LUG mailing list