User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Linux Servers and Apache section within the Tech Talk category of DaniWeb, a massive community of 391,554 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,603 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Linux Servers and Apache advertiser:
Views: 2748 | Replies: 1
Reply
Join Date: Jun 2006
Location: UK (Bristol)
Posts: 225
Reputation: Mushy-pea is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
Mushy-pea's Avatar
Mushy-pea Mushy-pea is offline Offline
Posting Whiz in Training

Using Apache for local testing on Windows

  #1  
Dec 23rd, 2006
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.
Last edited by Mushy-pea : Dec 23rd, 2006 at 8:30 am.
Hello, you're through to Steven on the BT Business technical help desk. Could I take your broadband telephone number please?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Posts: 1
Reputation: mangokun is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mangokun mangokun is offline Offline
Newbie Poster

Re: Using Apache for local testing on Windows

  #2  
Jan 21st, 2007
hi there, i had your problem, but found out the solution from this forum post: http://www.daniweb.com/techtalkforums/post293097-8.html
Originally Posted by MattEvans View Post
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...



Originally Posted by Mushy-pea View Post
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Linux Servers and Apache Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Linux Servers and Apache Forum

All times are GMT -4. The time now is 9:28 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC