Internal Server Error and malformed header from script
am 27.04.2009 17:57:14 von Jeff Zhuk--0-1704597526-1240847834=:722
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
After moving to mod_perl with Apache 2.2 I had this problem while running a=
simple test.pl
=A0
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 he=
ader"
=A0
Several people helped me to navigate over multiple related articles. Althou=
gh we focused mostly on the httpd.conf file, in my case the problem was in =
the script itself.
=A0
I commented=A0the first=A0line in my test.pl and this made the magic.
Before moving to mod_perl I needed this line, but apparently not anymore.
=A0
#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";
=A0
Here is the config in httpd.conf
=A0
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
#PerlSendHeader On
Order allow,deny
Allow from all=20
-----------------------------------------------
Thank you to everyone who responded to my messages, espesially Randy and An=
dre,
=A0
Jeff Zhuk
=0A
--0-1704597526-1240847834=:722
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
top" style=3D"font: inherit;"> |
--0-1704597526-1240847834=:722--