>I have a cgi script that can't seem to connect to a mysql database when
running from the >web. When I logon and run it from the command line, it
works fine!
>It dies on the $dbh->connect(...) line. It dies before the line returns so
I can't check $DBI::err or $DBI::errstr.
>Does mysql use any environment variables that need to be setup to run as a
cgi script?
Why you think, it is die before return ?
What construction you use:
1) if ($dbh->connect(...)) {
do some
} else {
print $DBI::errstr
}
or
2) $dbh = DBI->connect(...) or die $DBI::errstr;
please try second, and chech error_log in your Apache log directory.