My setup is: Mac OS X (Panther) with Perl 5.8.1, MySQL (v4.0.17) installed with Fink. Apache (v1.3.31) was compiled with both mod_perl and PHP. When I deployed a mod_perl module that connected to MySQL, the connections always failed with this error:
DBI connect('bjorkdb;port=3306','hamster',...) failed: Protocol mismatch. Server Version = 0 Client Version = 10 at ...which was really confounding because the connections in other runtime contexts were fine. I double checked to make sure I didn't have multiple libmysqlclient's around or additional Perl installations. All of that checked out.
I recompiled Apache without PHP and everything works great. So my conclusion is that something funky happens on Mac OS X when linking libmysqlclient. Looks like I'll have to keep another set of Apache binaries around should the need to run PHP locally recur, otherwise I'll just stick to the compile that has mod_perl but not PHP.( Jan 03 2005, 12:01:11 AM PST ) Permalink