"Premature end of Script Headers" [Archive] - C Board

PDA

View Full Version : "Premature end of Script Headers"


tetradtech
10-08-2002, 09:52 AM
:confused:

First, how come all the tutorials out there assume your doing your CGI programming in PERL?

Okay, I've copied some code from www.jmarshall.com with regard to how to process input from a form. I'm trying to take information from a text field on a form and use it in a CGI program to search for a TLD.

The 'script' compiles fine. When I run it, though, I get the "Prematrue end of Script Headers" error in my error_log file. The browser just gets a generic 500 error.

I know the bw-whois is working, cuz when I run the script with a constant as the domain name to check, I get a response page without any problems. So I know the error has to have something to do with trying to get the information from the text field and use it in my program.

Doesn't help that I'm really new to both C and Linux, so I've probably taken on too big of a task for my level - but generally that's how I learn.

See attached file for code.

tetradtech
10-09-2002, 10:29 AM
Not exactly certain how, but I managed to fix this problem. Ignore this post, please.

Brian
10-09-2002, 10:45 AM
It might be a problem with FTP'ing the file.

Remember to always FTP pl files in ASCII mode.