HTTP- 500 Error when Running a CGI Script on Oracle HTTP Server 11g (OHS)

(Doc ID 1547413.1)

Last updated on SEPTEMBER 21, 2016

Applies to:

Oracle Access Manager - Version 11.1.1.5.0 and later
Oracle HTTP Server - Version 11.1.1.3.0 to 11.1.2.0.0 [Release Oracle11g]
Information in this document applies to any platform.

Symptoms

When attempting to access Uniform Resource Identifier (URI) /cgi-bin/printenv - HTTP/1.1 500 Internal Server Error

Following

<Note:1484024.1> Integrating Oracle E-Business Suite Release 12 with Oracle Access Manager 11gR2 (11.1.2) using Oracle E-Business Suite AccessGate

Section - 4.4.3 Test Response Headers
Test that Oracle Access Manager sets the response headers as specified, for example by adding the printenv script to your protected resources and accessing the script from your browser as authenticated user. On a WebTier 11g, you will find the printenv script in your $ORACLE_INSTANCE/config/OHS/ohs1/cgi-bin directory. You may create a symbolic link and add this resource to your protected resources. For example:

cd $ORACLE_INSTANCE/config/OHS/ohs1/htdocs
ln -s ../cgi-bin cgi-bin
chmod 755 cgi-bin/printenv


Steps to Reprodcue after above setup,
1. Access http://webgate-host:port/cgi-bin/printenv
2. User gets redirected to OAM login page
3. Provide user credentials and submit the request
4. After successful authentication, OAM redirects back to http://host:port/cgi-bin/printenv, which results in 500 http response

Note if executing from command prompt ./printenv, or via browser (No OAM invovled) the HTTP/1.1 500 Internal Server Error occurs.

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms