Re: mysql connection failing as CGI



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.

.



Relevant Pages

  • Re: circular references
    ... it makes sense keeping them in the same dll. ... The interface has all the public methods of the class. ... So before you had dll_a referencing dll_b and vice versa. ... >> class A from dll_a depending on class B from dll_b and class B from dll_b ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: circular references
    ... It is 2 classes from each DLL. ... So they dont really have much in common to justify merging the 2 ... interfaces to keep the implementation in the original classes. ... > depending on class C of dll_a? ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: URGENT: OLEDB code working under WinCE3.0(PPC2002) but not under WinCE.NET(PPC2003)
    ... It might or might not work, depending on what the program ... You won't be able to debug with eVC 3 on a PPC2003 device, though, ... >> This dll runs fine under PPC2002. ... >> Does anyone know of anything related to OLEDB for SQLCE2.0 that would ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: URGENT: OLEDB code working under WinCE3.0(PPC2002) but not under WinCE.NET(PPC2003)
    ... It might or might not work, depending on what the program ... You won't be able to debug with eVC 3 on a PPC2003 device, though, ... >> This dll runs fine under PPC2002. ... >> Does anyone know of anything related to OLEDB for SQLCE2.0 that would ...
    (microsoft.public.pocketpc.developer)
  • Re: URGENT: OLEDB code working under WinCE3.0(PPC2002) but not under WinCE.NET(PPC2003)
    ... It might or might not work, depending on what the program ... You won't be able to debug with eVC 3 on a PPC2003 device, though, ... >> This dll runs fine under PPC2002. ... >> Does anyone know of anything related to OLEDB for SQLCE2.0 that would ...
    (microsoft.public.data.oledb)