Re: perl and mysql issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Issac,
 
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 <margol@xxxxxxxxxxxxx> 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?

Issac

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/mysql.so' for module DBD::mysql: ld.so.1: perl: fatal: libmysqlclient.so.15: open failed: No such file or directory at /usr/local/lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm 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/testdb.pl 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: users-unsubscribe@xxxxxxxxxxxxxxxx
" from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



Access over 1 million songs - Yahoo! Music Unlimited.
[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux