Still need to connect to Oracle via web to get raw sql select 
output into browser.   All ideas welcome !

Thanks Sapovits.  I changed to c:\\  (for correctness sake) but
 this fixes nothing & it doesn't seem to address the problem
(but is appreciated).  I continue to get correct output ( with c:\ or c:\\ ) 
running from the NT command line so this is not about 
script failure. When run from the  NT shell the script works.

The problem is:  connecting via web browser & authenticating to
Oracle via this perl/DBI script as a  cgi-bin .pl file.  This must 
be a common hurdle for the DBI/web "uninitiated" .

Surely DBI'ers are working with oracle via browser & not just 
command line. Perhaps someone can define how 
connecting via browser changes config/code requirements insofar
as  authenticating Oracle.  How can I  at least get a debug signal
to track this script (via Oracle or perl) ?  I get no error feedback
to the browser, web logs, or oracle log.  Perhaps I need to create
a special user for Oracle when coming through the web - but as what?

Again, it works fine as a command line perl/DBI connection script.

<< 
 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