Re: mysql connection failing as CGI
- From: ianatkinsonbsc@xxxxxxxxx
- Date: 22 Nov 2006 03:41:54 -0800
Ric wrote:
Can you check apache log?
tail -f /var/log/http/error_log
you may find the apache log somewhere else depending on your OS.
In addition to that I would use eval to find out what went wrong, see below
Sadly I can't, they have it readable only by root :(
eval{
$dbh =
DBI->connect("DBI:mysql:dbname:mydbname;host=213.171.218.249;port=3306",
"dbuser","dbpass",
{
RaiseError => 1
}
);
};
$SQL = "SELECT * FROM numbers";
$sth = $dbh->prepare($SQL);
$sth->execute();
if($@){
print $@;
}
while (@row = $sth->fetchrow_array) { print @row; print "\n"; }
print "</body></html>";
Ah, now I'm getting somewhere! Using the eval expression I now get the
following:
"res: install_driver(mysql) failed: Can't load
'/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBD/mysql/mysql.so'
for module DBD::mysql: libmysqlclient.so.10: cannot open shared object
file: No such file or directory at
/usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229. at
(eval 1) line 3 Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
at numbers2.pl line 15 ed"
Which suggests to me that the web user on the server isn't getting the
same library paths back as I am when I SSH into the box? This is
something I can investigate now I have the error anyway!
Thanks for your help,
Ian.
.
- References:
- mysql connection failing as CGI
- From: ianatkinsonbsc
- Re: mysql connection failing as CGI
- From: Ric
- mysql connection failing as CGI
- Prev by Date: Re: Perl substitution working on some machines but not others?
- Next by Date: Re: generic increment of number/string
- Previous by thread: Re: mysql connection failing as CGI
- Next by thread: Using a variable in a matching string
- Index(es):
Relevant Pages
|