?
Solved

CGI errors

Posted on 2003-12-11
4
Medium Priority
?
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 22

Expert Comment

by:pjedmond
ID: 9921232
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
ID: 9921867
The problem was I didn't have the cgi module installed. Currently trying to fix it.

Thanks anayway.
0
 

Expert Comment

by:YensidMod
ID: 9924289
I have PAQed the question and refunded the 50 points.

YensidMod
Experts Exchange Moderator
0
 
LVL 1

Author Comment

by:Paulmul
ID: 9927386
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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). #…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

719 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