--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
<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 An=
dre,
=A0
Jeff Zhuk=0A=0A=0A
--0-1704597526-1240847834=:722
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<table cellspacing=3D"0" cellpadding=3D"0" border=3D"0" ><tr><td valign=3D"=
top" style=3D"font: inherit;"><DIV>After moving to mod_perl with Apache 2.2=
I had this problem while running a simple test.pl</DIV>
<DIV> </DIV>
<DIV>The browser displayed: "HTTP 500 - Internal Server Error" and in the e=
rror.log I could see "malformed header from script" and "did not send an HT=
TP header"</DIV>
<DIV> </DIV>
<DIV>Several people helped me to navigate over multiple related articles. A=
lthough we focused mostly on the httpd.conf file, in my case the problem wa=
s in the script itself.</DIV>
<DIV> </DIV>
<DIV>I commented the first line in my test.pl and this made the m=
agic.</DIV>
<DIV>Before moving to mod_perl I needed this line, but apparently not anymo=
re.</DIV>
<DIV> </DIV>
<DIV>#print "HTTP/1.0 200 OK\n"; ## !!! This line is extra while using mod_=
perl !!! - JZ<BR>print "Content-Type: text/html\n\n";<BR>print "\n";<BR>pri=
nt "HELLO!\n";<BR></DIV>
<DIV> </DIV>
<DIV>Here is the config in httpd.conf</DIV>
<DIV> </DIV><SPAN lang=3DEN>
<DIV><Directory "C:/myScripts/" ></DIV><FONT face=3D"Courier New" siz=
e=3D2><FONT face=3D"Courier New" size=3D2>
<DIV><Files ~ "\.(pl|ip|plx)$"></DIV></FONT></FONT><FONT size=3D2>
<DIV>SetHandler perl-script</DIV>
<DIV>PerlResponseHandler ModPerl::Registry</DIV>
<DIV>PerlOptions +ParseHeaders</DIV>
<DIV>Options +ExecCGI</DIV></FONT>
<DIV><FONT face=3D"Times New Roman">#PerlSendHeader On</FONT></DIV>
<DIV><FONT face=3D"Times New Roman"></Files></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3D"Times New Roman">Order allow,deny</FONT><=
/DIV>
<DIV>Allow from all </DIV>
<DIV></Directory></DIV>
<DIV></FONT></SPAN><BR>-----------------------------------------------</DIV=
>
<DIV>Thank you to everyone who responded to my messages, espesially Randy a=
nd Andre,</DIV>
<DIV> </DIV>
<DIV>Jeff Zhuk</DIV></td></tr></table><br>=0A=0A
--0-1704597526-1240847834=:722--
