httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Goh <>
Subject Re: [users@httpd] perl and mysql issue
Date Wed, 13 Dec 2006 17:11:34 GMT
  Thanks for your quick reply.  This installation are all new in my server.
  I can run the script as any user as long as I set the LD_LIBRARY_PATH to /usr/local/mysql/lib/mysql
path, w/o this LD set, i got same error as show up on the web site.
  So I am not sure how to set the LD in the script?
  My apache run with user nobody and group nobody.
  thanks again!

Issac Goldstand <> wrote:
  It looks like your MySQL client library isn't installed properly, or
else require some special odd permissions.

Did you recently change anything in your server MySQL setup?
Can you run the Perl script on the server as the same user Apache runs as?
Finally, just to be absolutely sure - when you say it runs from the
"command" line, you *do* mean the command line on the Apache server, right?


Jim Goh wrote:
> Hi,
> 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:
> #!/usr/local/bin/perl
> 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 15 
> Thanks all for your help!
> ------------------------------------------------------------------------
> Any questions? Get answers on any topic at Yahoo! Answers
> .
> Try it now.

The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail:
" from the digest:
For additional commands, e-mail:

Access over 1 million songs - Yahoo! Music Unlimited.
View raw message