Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Execution error with perl program

Posted on 2000-02-23
3
Medium Priority
?
123 Views
Last Modified: 2013-12-25
I have a perl classified script which i have configured and hosted on the server. But it does not execute and the error is Error 500 - Internal Server Error, and it says, Premature end of Script Headers. What could be the problem?
0
Comment
Question by:rvarshneya
[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
3 Comments
 
LVL 2

Accepted Solution

by:
mattrope earned 300 total points
ID: 2550252
This error means that "Content-type: text/html\n\n" is not the first thing being printed out by your script.  Either something else is printing out first (possibly an error message), or your script is dying and not printing anything at all out.  Try placing the

  print "Content-type: text/html\n\n"

command at the very front of the program and see if the error continues.  You could also try running the program manually from the command line (i.e. not as a CGI script) and try to figure out what is getting printed out before the content type.

Hope this helps.
0
 

Author Comment

by:rvarshneya
ID: 2550648
Well, when i try to execute the script from the perl interpreter, it first prints bad command and file name twice and then prints out the output starting from the line Content Type: text/html and then the html output is printed out. But let me try by using the line that is "Content-Type: text/html\n\n" at the very front of the program.
0
 

Author Comment

by:rvarshneya
ID: 2550696
Thanx a lot... it helped.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

604 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