httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Goh <>
Subject [users@httpd] perl and mysql issue
Date Wed, 13 Dec 2006 15:52:18 GMT
  I have perl 5.6.1 and mysql 5.0.24 installed and the following perl script works fine from
command line, but not working when I run from the IE browser:
  use DBI;
use CGI qw(:standard);
use CGI::Carp 'fatalsToBrowser';
use strict;
  print header;
print start_html;
  my $docID;
my $docfile = "test.doc";
my $docdesc = "this is test";
my $last_update;
my $dbh = DBI->connect("dbi:mysql:dbname", "username", "password" )
        or &dienice("Can't connect to database: $DBI::errstr");
  my $sth = $dbh->prepare("insert into test_tbl values(?,?,?,?)") or &dbdie;
$sth->execute($docID, $last_update, $docfile, $docdesc) or &dbdie;
  print end_html;

  and here is the error i got from browser after ran it:
  Software error:
install_driver(mysql) failed: Can't load '/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/DBD/mysql/'
for module DBD::mysql: perl: fatal: open failed: No such file
or directory at /usr/local/lib/perl5/5.6.1/sun4-solaris/ line 206.   at (eval
10) line 3  Compilation failed in require at (eval 10) line 3.  Perhaps a required shared
library or dll isn't installed where expected   at /usr/local/apache2/cgi-bin/ line

Thanks all for your help!

Any questions?  Get answers on any topic at Yahoo! Answers. Try it now.
View raw message