Solved

Execution error with perl program

Posted on 2000-02-23
3
117 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanx a lot... it helped.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
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 …
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

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

11 Experts available now in Live!

Get 1:1 Help Now