Wrong forum? Hardly : Perl, Oracle, and a browser

From: Yurasis Dragon <spam_at_smeagol.com>
Date: Mon, 03 Dec 2001 01:59:15 GMT
Message-ID: <hrml0usvvfm76va511diubc297arvsdgeb_at_4ax.com>


[Quoted] Thanks for the help guys.

Note how all the help came from the "wrong" group. Looks like I made the correct choice for the very reason that I posted in the comp.databases.oracle.tools group. Oracle people who work with a webserver would have the answer I'm looking for.

Thanks again.

[Quoted] Yurasis Dragon <spam_at_smeagol.com> :

>I'm playing with Perl and DBI and Oracle DBD and have
>been able to get my Perl script read an Oracle database
>and output the results at the command line.
>
>However, once I put the script in the cgi-bin and try to
>run it from a browser, I get not output ( can't remember
>the exact message, sorry ).
>
>I dug around a little more and found that I need to add
>something like :
>
> print "Content-type: text/plain\n\n" ;
>
>So I added that code ... but still no output to a browser.
>
>I wrote a small Perl script, a "hello world" type, and added the
>above line and the script output to a browser, no problem.
>
>It seems to be when I try to connect to an Oracle database
>that I have the problem. So I ran the script at the command
>line as root and found that it did not run correctly until I defined
>ORACLE_HOME.
>
>So this leads me to suspect that Apache needs to know about
>ORACLE_HOME in order for my Perl script that accesses an Oracle
>database to work in a browser.
>
>So the question is where do I define ORACLE_HOME and how. Is
>it something like "SetEnv ORACLE_HOME /oracle/product/8.1.7"
>added in httpd.conf?
>
>I think that I can do a similar thing in my Perl script directly ( I'm pretty new
>to Perl but do recall that I can set an environment variable in Perl ) but I don't
>want to have to do that to every Perl script, a more global solution is
>preferable and much more elegant.
>
>Any suggestions? Thanks in advance.
>
>
>===
>Yurasis Dragon
>spam_at_smeagol.com

===
Yurasis Dragon
spam_at_smeagol.com Received on Mon Dec 03 2001 - 02:59:15 CET

Original text of this message