HTTP-500 Internal Server Error when Requesting /cgi-bin/ Scripts to HTTP Server Configured with ODL (OraLogMode Oracle) (Doc ID 556625.1)

Last updated on DECEMBER 05, 2016

Applies to:

Oracle HTTP Server - Version: 10.1.2.0.2 and later   [Release: AS10gR2 and later ]
Information in this document applies to any platform.

Symptoms

Problem Statement:
In an Oracle Collaboration Suite 10.1.2.0.2 installation, after enabling ODL logging, the HTTP Server is unable to execute any cgi script file from the /cgi-bin/ directory.

This causes the Calendar Admin pages (and any other cgi)  to return error HTTP-500 - Internal Server Error

To Reproduce:

1) Assuming the following cgi script located under : $ORACLE_HOME/Apache/Apache/cgi-bin :

more test.cgi

#!<ORACLE_HOME>/perl/bin/perl
print "Content-type: text/html\n\n";
print "<html>test</html>";

2) Edit httpd.conf

3) Add

OraLogMode oracle
OraLogSeverity TRACE:8

4) Bounce OHS

5) Calling the URL http://host:port/cgi-bin/test.cgi will results in the following error :

"...
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your
request.
Please contact the server administrator, you@your.address and inform them of the time the error
occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server Server at ..."


6) The file access_log shows :

<ip> USER1 [11/Dec/2007:10:10:01 +0100] "GET /cgi-bin/test.cgi HTTP/1.1" 500 661

7) The file $OH/Apache/Apache/logs/oracle/log.xml shows :

<MESSAGE>
<HEADER>
<TSTZ_ORIGINATING>2007-12-11T09:09:01.8427Z</TSTZ_ORIGINATING>
<ORG_ID>oracle.com</ORG_ID>
<COMPONENT_ID>OHS</COMPONENT_ID>
<HOSTING_CLIENT_ID><ip></HOSTING_CLIENT_ID>
<MSG_TYPE TYPE="ERROR"></MSG_TYPE>
<MSG_LEVEL>17</MSG_LEVEL>
<HOST_ID>...</HOST_ID>
<MODULE_ID>mod_cgi.c</MODULE_ID>
<PROCESS_ID>25509</PROCESS_ID>
<USER_ID>USER1</USER_ID>
</HEADER>
<CORRELATION_DATA>
<EXEC_CONTEXT_ID>
<UNIQUE_ID>96524482329</UNIQUE_ID>
<SEQ>1</SEQ>
</EXEC_CONTEXT_ID>
</CORRELATION_DATA>
<PAYLOAD>
<MSG_TEXT>Premature end of script headers:<ORACLE_HOME>/Apache/Apache/cgi-bin/test.cgi</MSG_TEXT>
</PAYLOAD>
</MESSAGE>

8) After removing the following entries from httpd.conf and re starting OHS :

OraLogMode oracle
OraLogSeverity TRACE:8

9) Calling the URL http://host:port/cgi-bin/test.cgi displays the following output on the browser :

"test"


Also tested with other levels (e.g. OraLogSeverity INTERNAL_ERROR:10) and different location (e.g.
before the load of the modules : as recommended),

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