Solved

CGI errors

Posted on 2003-12-11
4
306 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 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