Your web-server is running under a different account than your telnet
session and consequently has a different environment. I guess they are
using different versions of perl. On telnet do `which perl` to see where
you are running it from and change the shebang in your cgi-script to reflect
this.
--
Simon Oliver
----- Original Message -----
From: Jeremy E Cath <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, August 27, 2001 4:55 AM
Subject: DBD::MySQL okay from telnet, fails from http
> Weird plea for help...
>
> Have installed DBI and DBD::mysql using CPAN on a RedHat 6.2 build, with
> a working MySQL implementation, and all appears to go well...
>
> If I create and save as test.cgi (into the web servers cgi-bin
> directory)
> #!/usr/bin/perl
> use DBI;
> my $quiet = 1;
> my @drivers = DBI->available_drivers($quiet);
> print "Available Drivers:\n";
> for(@drivers) {
> print "$_\n";
> }
> print "Done\n";
>
> from a telnet prompt as "perl test.cgi"
> I get a list of drivers including mysql, and database queries etc work.
>
> I then run exactly the same script from a web browser as
> url/cgi-bin/test.cgi, expecting the same list of drivers, but... only
> get the basic drivers - no mysql listed, although a new one "Pg" appears
> in the list
>
> If anyone has any suggestions they'd be gratefully received - please
> instruct for a newbie... have usually used pre-configured virtual
> servers.. first time I've had my own to worrk about !
>
>
>
> Jeremy E Cath
> Rufan-Redi
> t: 0419 204 532
> e: [EMAIL PROTECTED]
> w: www.rufan-redi.com
>
>
>