[prev in list] [next in list] [prev in thread] [next in thread] 

List:       msql-mysql-modules
Subject:    Re: DBD::MySQL okay from telnet, fails from http
From:       "Simon Oliver" <simon.oliver () umist ! ac ! uk>
Date:       2001-08-27 9:10:42
[Download RAW message or body]

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 <jeremy@rufan-redi.com>
To: <dbi-users@perl.org>; <msql-mysql-modules@lists.mysql.com>
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: jeremy@rufan-redi.com
> w: www.rufan-redi.com
>
>
>


---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail msql-mysql-modules-thread1389@lists.mysql.com

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail msql-mysql-modules-unsubscribe@lists.mysql.com instead.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic