Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Where does CGI script get HTTP_USER_AGENT and PATH values from?
"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>
foreach $key (sort keys(%ENV)) { print "<li>$key: $ENV{$key}</li>\n";
print <<end_all;
</ul> </body> </html>
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
![]() |
![]() |