Solved

CGI errors

Posted on 2003-12-11
4
303 Views
Last Modified: 2010-03-04
Hi,

whenever I try to run perl scripts on my webserver I get

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

I figure I have apache set up wrong somewhere.

any ideas?

thanks
0
Comment
Question by:Paulmul
  • 2
4 Comments
 
LVL 22

Expert Comment

by:pjedmond
Comment Utility
This implies that there is a problem with your scripts. Try running the cgi script from the command line and check that the information that it prints out is correct. (Use the -w option to get any extra data relating to the script errors concerned)

You can check everythng is working on the apache side by trying the following simple script:

--------------X8---------------
#!/usr/bin/perl -w

print "Content-type: text/html\n\n";
print "Hi there!\n";

--------------X8---------------

One real headache that can cause this problem is that on a *nix system, you have DOS line endings. Make sure that the lines are ended appropriately for the system concerned.

HTH:)
0
 
LVL 1

Accepted Solution

by:
Paulmul earned 0 total points
Comment Utility
The problem was I didn't have the cgi module installed. Currently trying to fix it.

Thanks anayway.
0
 

Expert Comment

by:YensidMod
Comment Utility
I have PAQed the question and refunded the 50 points.

YensidMod
Experts Exchange Moderator
0
 
LVL 1

Author Comment

by:Paulmul
Comment Utility
Just to add, to check this, go to where the httpd executable is. type ./httpd -l this will tell you what modules are installed.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now