Are you sure you're using the same version of perl, with the same @INC for both cases? It sounds to me like when it's run under mod_perl it may be using a different DBD::mysql & client library or something ...

Just an idea ...

At 11:55 PM -0500 11/20/03, Chris Devers wrote:
Okay, let me try a reduced version of this problem.

I have a short script that does nothing but establish a connection to
MySQL via DBI/DBD::MySQL:

    $ cat test.pl
    #!/usr/bin/perl -wT

use DBI;

    my $host = "localhost";
    my $db   = "[....]";
    my $user = "[....]";
    my $pass = "[....]";
    my $dsn  = "DBI:mysql:host=$host;database=$db";
    my $dbh = DBI->connect( $dsn, $user, $pass )
              or die "Cannot connect to database: \n$DBI::errstr\n $!";

print qq[Content-type: text/plain

    If you can read this then DBI connected.
    ];

-- Ray Zimmerman / e-mail: [EMAIL PROTECTED] / 428-B Phillips Hall Sr Research / phone: (607) 255-9645 / Cornell University Associate / FAX: (815) 377-3932 / Ithaca, NY 14853

Reply via email to