|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi, I am running into a very frustating problem. I was running a lot of complicated perl-cgi scripts and they were all working perfectly fine. I had to move to a new server which I set up the other day (Apache 1.3.9).
I moved all the scripts over and then tried them. They all give me 500 internal error. I checked the log file and it says "premature end of script header"!! I checked: 1. perl path (correct) 2. Correct header print ("Content-type: text/html") 3. There is a line after the header print. 4. Perl is 5.00503 I even tried a very easy script and it is also giving me the same error. #!/usr/bin/perl print "Content-type: text/htmlnn"; print "Hello"; This runs fine from the command line with no error, but via the web, it's 500 internal error because of "premature end of script" URL I do not think this is the web server problem.(?) Please help. Thanks. [This message has been edited by vbedceo (edited January 04, 2000).] [This message has been edited by vbedceo (edited January 04, 2000).] |
|
#2
|
|||
|
|||
|
In your original scripts try utilising the: strict, CGI::Carpt qw(fatalsToBrowser), and diagnostics perl modules. That's all I can say, the script looks fine, you may want to comb your httpd.conf one more time just to make sure... sorry I couldn't be of more help. |
|
#3
|
|||
|
|||
|
u have done everything very fine
but u never entered mime type properly it is "Content-type: text/html nn" don't forget to give "nn" in the end I think this should work |
|
#4
|
|||
|
|||
|
If you didn't notice they did remember the nn!
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Premature end of script !!@# |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|