Re: help! where is this bug?!
[prev]
[thread]
[next]
[Date index for 2005/03/16]
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)
|