Re: help! where is this bug?!

[prev] [thread] [next] [Date index for 2005/03/16]

From: Ray Zimmerman
Subject: Re: help! where is this bug?!
Date: 19:30 on 16 Mar 2005
Answering my own question ...

On Mar 16, 2005, at 8:08 AM, I wrote:
> I need some help with a hard-to-locate (for me) bug. After some major 
> upgrades of OS, perl, apache, etc a mod_perl app that worked fine 
> before began complaining that "You have an error in your SQL syntax". 
> I found it was due to incorrect quoting based on incorrect mysql 
> column types returned by DBI/DBD::mysql. Strangely, a stand-alone 
> script returns the correct column types, but the same script executed 
> by mod_perl gives incorrect types. I should mention that aside from 
> this I haven't noticed any other problems with the mod_perl 
> installation.

Aaargh!  I finally found it ... one of the nastiest "gotchas" I've been 
bitten by in a while.

It was because DBD::mysql will happily use mysql client routines 
residing in libphp4.so !!!  I had built the PHP4 module with mysql 
support, which by default uses the mysql client libraries (3.23.49) in 
the php distribution. But DBD::mysql was built using the system mysql 
libraries (4.1.7). Since the libphp4.so was loaded before the Perl 
stuff it used the wrong library. Getting rid of PHP or forcing it to 
load later fixed the problem. I assume building it with the system 
mysql client libraries should do the trick as well.

That'll teach me!

Ray Zimmerman
Director, Laboratory for Experimental Economics and Decision Research
428-B Phillips Hall, Cornell University, Ithaca, NY 14853
phone:  (607) 255-9645

(message missing)

help! where is this bug?!
Ray Zimmerman 21:49 on 15 Mar 2005

help! where is this bug?!
Ray Zimmerman 13:08 on 16 Mar 2005

Re: help! where is this bug?!
Ray Zimmerman 19:30 on 16 Mar 2005

Generated at 21:06 on 16 Mar 2005 by mariachi v0.52