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

Home -> Community -> Usenet -> c.d.o.server -> 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: Manuela Mueller <520040906697-0001_at_t-online.de>
Date: Sun, 09 Dec 2001 01:01:23 +0100
Message-ID: <3C12A9D3.169F3BA6@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 Sat Dec 08 2001 - 18:01:23 CST

Original text of this message

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