For one thing, your ORACLE_HOME path isn't what you think.
'\' is the escape character.  To use it in a string as a 
literal, you need to use two:

    $ENV{ORACLE_HOME}="c:\\orant";

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 16, 2001 1:52 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Oracle-DBI-Win2k-Apache
> 
> 
> How do we get raw sql "select" output to display in
>  the browser  when connecting to an Oracle DBI script? 
> 
> Have a test which executes & fine on command line but 
> same script stops @ connect line when run as cgi
>  via browser.  
> 
> Is there something extra required ( to oracle or perl) when 
> transitioning
> scripts from command line to authenticating via web?
> Using system/manager ( Oracle userid/password) in
> the connect string.  Print statements, etc work
> leading up to DBI connect line then stops (when run
>  from browser).
> 
> TIA!
> 
> *******************************************
> the test script follows.  last working line is the print 
> statement before connect line. However, same script
> runs to completion on NT command line. Not sure
> how to debug this since "trace" line never gets reached.
> ********************************************
> #!d:/perl/bin/perl.exe -w
> 
> print "Content-type: text/html\r\n\r\n";
> use CGI;
> BEGIN {
>   $ENV{SERVER_NAME}="me.company.org";
>   $ENV{ORACLE_HOME}="c:\orant";
>   $ENV{ORACLE_SID}="orat1";
>   $ENV{DBI_TRACE}=3;
>   $ENV{PERL_DBI_DEBUG}=3;
> }
>       foreach $key (keys %ENV) {
>       print "$key --> $ENV{$key}";
> }
> 
> foreach $dir (@INC) {
> print "$dir\n"
> }
> print "\n test11 \n<\H2>";
> %attr = (
>  PrintError => 0,
>  RaiseError => 1
> );
> my $dbh = DBI->connect("dbi:Oracle:orat1", "system", 
> "manager", \%attr )
>     or die "cant connect: , $dbi::errstr(), \n";
> 
> $dbh->trace(3, "dbitrace.log");
> .
> .
> ********************
> 

Reply via email to