Hi Chris,

I don't know if you ever fixed this problem, but I've been having the same thing happen to me. A Perl script using DBI works fine as a CGI script or handler, but not under mod_perl, yielding the "Protocol mismatch" error.

I managed to fix it, what was causing it for me was my system getting its knickers in a twist with same Fink installed stuff against Mac OS X built packages. There seemed to be two versions of some Perl libraries on the system and it turns out that mod_perl was using one, and the built modules another - I think.

Anyway I noticed it when compiling Msql-Mysql-modules by hand, the message, not an error was:

Multiple copies of Driver.xst found in: /sw/lib/perl5/5.8.1/darwin-thread-multi-2level/auto/DBI /Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI at ./Makefile.PL line 68
Using DBI 1.38 installed in /sw/lib/perl5/5.8.1/darwin-thread-multi-2level/auto/DBI


What I did was simply renamed /sw/lib/perl5/ to /sw/lib/perl5.old/ so that things would use the OS X path under /Library/Perl/ instead, then rebuilt Msql-Mysql-modules and Apache::DBI. Now it works a treat.

Essentially I'd say generally one needs to be careful with OS X and having a mix of packages and libraries coming from Fink and as either Apple installed or OS X packaged programmes. In all cases I reckon one should go for the latter types and not Fink where at all possible. Hence use MySQL Mac OS X package from dev.mysql.com and NOT the Fink MySQL package, install Perl modules from CPAN, not using Fink, etc. Save fink for running Abiword and the GIMP etc.

Lastly, for reference, my software versions:

- Darwin Kernel Version 7.5.0:
- Mac OS X: ProductVersion: 10.3.5, BuildVersion:   7M34
- gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)
- Perl v5.8.1-RC3 built for darwin-thread-multi-2level
- GNU Make version 3.79
- Apache::DBI 0.94
- Msql-Mysql-modules 1.2219
- MySQL 4.0.20-standard
- Apache/1.3.29 (Darwin)
- DBI 1.45

Hope that helps, if anyone else has this problem, try investigating the above, might help. If it does, please post to confirm that it works.

Cheers,

Mike.


---------- Mike Harris Psand.net Tlf: +34 69 676 3122 / +44 870 162 4927 ext 2 Fax: +44 870 162 4925 Web: http://psand.net PGP: http://www.psand.net/mike/mike.gpg.pub IRC: irc://darksun.psand.net:6667/#psand ---------- Harto de Internet Exploiter? Instálate Firefox ya!: http://www.mozilla.org/products/firefox/


Chris Devers wrote:

Out of curiosity, is anyone else seeing DBI errors in their Panther Apache
error log? Here's a typical example, slightly obscured & pretty-printed:

    [Thu Nov 20 11:24:57 2003] null:
         DBI connect('host=$h;database=$db','$un',...) failed:
 +->     Protocol mismatch. Server Version = 0 Client Version = 10
         at /path/to/script line $n

The important bit being the "protocol mismatch" line. I've been seeing it
ever since I upgraded to Panther last month. Normal CGI scripts that use
DBI work just fine, but trying to run Apache::DBI keeps failing.

I've poked around on Google, but found no hits for the particular error
I'm seeing. I did get some hits for different values for the server &
client versions, but no clear explanations or solutions to the problem.

I'm running the stock Apache 1.3.28 & Perl v5.8.1-RC3 as supplied by
Apple. These are trying to connect via Apache::DBI (current version, 0.92;
I just tried rebuilding it *again* in the CPAN shell but no change) to a
Fink provided instance of MySQL 4.0.15. Other system details:

    $ hostinfo
    Mach kernel version:
             Darwin Kernel Version 7.0.0:
    Wed Sep 24 15:48:39 PDT 2003; root:xnu/xnu-517.obj~1/RELEASE_PPC


Kernel configured for up to 2 processors. 2 processors are physically available. Processor type: ppc7400 (PowerPC 7400) Processors active: 0 1 Primary memory available: 896.00 megabytes. Default processor set: 107 tasks, 268 threads, 2 processors Load average: 2.68, Mach factor: 0.23

    $ sw_vers
    ProductName:    Mac OS X
    ProductVersion: 10.3.1
    BuildVersion:   7C107

Other details available on request. Any suggestions appreciated :)



Reply via email to