Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Where does CGI script get HTTP_USER_AGENT and PATH values from?

Re: Where does CGI script get HTTP_USER_AGENT and PATH values from?

From: Terri I. <teresni_at_ucia.gov>
Date: 10 Dec 2001 09:00:45 -0800
Message-ID: <b1f8b3bc.0112100900.44aa0060@posting.google.com>

The PERL CGI script that I am connecting to does run the command you suggested - it displays values of all environment variables, as well as output of whoami and id commands. What I'm trying to figure out is where some of those settings (namely the HTTP_USER_AGENT) are being set (i.e., which web server configuration file is setting it).

FYI, I am running Oracle 8.1.7 and Apache on SunOS 5.6, on a SunSPARC.

Manuela Mueller <520040906697-0001_at_t-online.de> wrote in message news:<3C12A9D3.169F3BA6_at_t-online.de>...
> "Terri I." wrote:
> >
> > I've got an Oracle application that is launching some Java
> > code to connect via https to a CGI script. That CGI script writes a
> > file with all environment variables. The HTTP_USER_AGENT value is
> > "Java1.2.1", although I've installed the 1.3.1 version of the JDK/JRE
> > on the server. I cannot figure out what configuration files (Oracle?
> > Apache?) are making the settings that the CGI script then displays.
> > Can someone tell me where the web server settings are defined that
> > would cause the HTTP_USER_AGENT field to be set to Java1.2.1??
> > Because of this, my application will not work properly because it
> > requires JDK 1.3. I set the path and classpath for the 'Oracle' user,
> > but maybe browser https requests are treated as some other user such
> > that the appropriate paths are not being referenced.
>
>
> Hello Terri,
> don't know your platform, web server software, if you have perl
> installed.
> If you have it installed, th following simple script might answer your
> question
>
> #!/usr/bin/perl
> # case 1: Program runs via apache, webbrowser is client: show alls
> variables for the hash %ENV
> # case 2: Program runs simply via command line, shows all settings for
> the user
> # (like SET command)
> print "Content-type: text/html", "\n\n";
>
> print <<end;
> <html>
> <head>
> <title>ENV</title>
> </head>
> <body>
> <h1>Environment variables of Apache-Servers</h1>
> <ul>
> end
>
> foreach $key (sort keys(%ENV)) {
> print "<li>$key: $ENV{$key}</li>\n";
> }
>
> print <<end_all;
> </ul>
> </body>
> </html>
> end_all
>
> exit(0);
>
> Feel free to drop me a line if you have questions baout the script.
> Manuela Mueller
> PS: I assume it is the web server.
Received on Mon Dec 10 2001 - 11:00:45 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US