Solved

Execution error with perl program

Posted on 2000-02-23
3
118 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
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
mattrope earned 100 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
powershell script help 5 79
Ready Made PHP Scripts 5 70
Run command in each subfolder using batch file 7 60
Change the background and font colors in Notepad++ 5 86
Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to count occurrences of each item in an array.

773 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