Hello everyone. I decided to try out XAMPP ( http://www.apachefriends.org/en/xampp ), which contains a pre configured distribution of Apache 2.2.3. My intention is to use it for some local testing of a web application that uses Perl scripts. I got Apache running easily enough and it runs the sample Perl script that comes with it fine. However, when I ask it to run my script I get

The server encountered an internal error and was unable to complete your request.

Error message: Premature end of script headers

The test script and mine both start with

#!"C:\Program Files\xampp\xampp\perl\bin\perl.exe"
print "Content-type: text/html"

The script is in the "htdocs" directory within the XAMPP directory. Can anyone think what might be going wrong here? Any help appriciated.

Steven.

hi there, i had your problem, but found out the solution from this forum post: http://www.daniweb.com/techtalkforums/post293097-8.html

well, I found a good "first-thing" to do with test scripts is to change the .pl script first line to:

#!"C:\ActivePerl\bin\perl.exe"

(if that's where your activeperl is)... that stops you needing to extend the tiny Perl version that comes with XAMPP...

Hello everyone. I decided to try out XAMPP ( http://www.apachefriends.org/en/xampp ), which contains a pre configured distribution of Apache 2.2.3. My intention is to use it for some local testing of a web application that uses Perl scripts. I got Apache running easily enough and it runs the sample Perl script that comes with it fine. However, when I ask it to run my script I get

The server encountered an internal error and was unable to complete your request.
 
Error message: Premature end of script headers

The test script and mine both start with

#!"C:\Program Files\xampp\xampp\perl\bin\perl.exe"
print "Content-type: text/html"

The script is in the "htdocs" directory within the XAMPP directory. Can anyone think what might be going wrong here? Any help appriciated.

Steven.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.