perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Zhuk <jeff_z...@yahoo.com>
Subject Internal Server Error and malformed header from script
Date Mon, 27 Apr 2009 15:57:14 GMT
After moving to mod_perl with Apache 2.2 I had this problem while running a simple test.pl
 
The browser displayed: "HTTP 500 - Internal Server Error" and in the error.log I could see
"malformed header from script" and "did not send an HTTP header"
 
Several people helped me to navigate over multiple related articles. Although we focused mostly
on the httpd.conf file, in my case the problem was in the script itself.
 
I commented the first line in my test.pl and this made the magic.
Before moving to mod_perl I needed this line, but apparently not anymore.
 
#print "HTTP/1.0 200 OK\n"; ## !!! This line is extra while using mod_perl !!! - JZ
print "Content-Type: text/html\n\n";
print "\n";
print "HELLO!\n";

 
Here is the config in httpd.conf
 
<Directory "C:/myScripts/" >
<Files ~ "\.(pl|ip|plx)$">
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
#PerlSendHeader On
</Files>
Order allow,deny
Allow from all 
</Directory>

-----------------------------------------------
Thank you to everyone who responded to my messages, espesially Randy and Andre,
 
Jeff Zhuk


      
Mime
View raw message