Description of problem: Upon completing and executing the following script with the proper permissions, the following error occurs. This error did not occur until after the upgrade from 7.2 to 9.0 took place. Unfortunately, this part of the testing was overlooked or if it's safe to say, not expected. With php, we have no problem capturing the ip addresses (echo $REMOTE_IPADDR) but, the phpinfo() environment didn't provide us with any other ip information for capturing variables such as the host, referal, etc... which is why we are requiring a fix for 9.0's web server configuration from RH 7.2s OS. Here's the code we were using on 7.2 that will no longer work on platform 9.0 with failing results at the end of this message copied and pasted directly from the browser: (perl was tested and seems to be working) #!/usr/bin/perl -Tw $REMOTEIP= $getenv('REMOTE_ADDR'); $REMOTEHOST= $getenv('REMOTE_HOST'); $REFERAL_ADDRESS= $getenv('HTTP_REFERER'); @SUBNET_NUMBERS = split (/\./, $REMOTEIP); $PACKEDIP = pack ("C4", @SUBNET_NUMBERS); ($REMOTEHOST) = gethostbyaddr ($PACKEDIP, 2); print "Content-Type: text/plain \r\n\r\n"; print "<pre>"; print "Your address is: ", $REMOTEIP, "\n"; print "Your hostname is: ", $REMOTEHOST, "\n"; print "You came from: ", $REFEREAL_ADDRESS, "\n"; print `date`, "\n"; print "This server: ", `uptime`, "\n"; print "</pre>"; exit(0); Here's the error message pasted from the browsers Mozilla and IE6: Server error! The server encountered an internal error and was unable to complete your request. Error message: Premature end of script headers: remote_addr.cgi If you think this is a server error, please contact the webmaster Error 500 Thu 01 May 2003 06:21:51 PM PDT Apache/2.0.40 (Red Hat Linux) Is it quite possible that Apache wants to do the LF -> CRLF conversion itself, and therefore, considers CRLFs an error condition. Is there a fix for this? If so, please provide Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1.cut and paste above code, save as remote_addr.cgi and .pl for testing. chmod x remote_addr.cgp or .pl 2.execute from a browser 3.witness error message as provided right after the code above. Actual results: Server error! The server encountered an internal error and was unable to complete your request. Error message: Premature end of script headers: remote_addr.cgi If you think this is a server error, please contact the webmaster Error 500 isprofessionals.biz Thu 01 May 2003 07:37:14 PM PDT Apache/2.0.40 (Red Hat Linux) Expected results: Results of the remote nodes is configuration should display. Once displayed, we will incorporate it into the rest of our processform (html and php) for email confirmations Additional info: Hope this information is enough to provide a solution. Thank you.
Close this bug report. Converted cgi script over to PHP successfully.
This needs to be reopened. I am having the same problem since I upgraded to the latest release of perl I have had the same problem.
Alex: can you open a separate bug, describe the problem you are having and include any error_log messages, the script which reproduces the error, and any other relevant details?