C Board  

Go Back   C Board > Platform Specific Boards > Linux Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 10-08-2002, 09:52 AM   #1
Registered User
 
Join Date: Oct 2002
Posts: 13
Exclamation "Premature end of Script Headers"



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.
Attached Files
File Type: c systemtest.c (4.3 KB, 41 views)
tetradtech is offline   Reply With Quote
Old 10-09-2002, 10:29 AM   #2
Registered User
 
Join Date: Oct 2002
Posts: 13
Ignore this post

Not exactly certain how, but I managed to fix this problem. Ignore this post, please.
tetradtech is offline   Reply With Quote
Old 10-09-2002, 10:45 AM   #3
Registered User
 
Join Date: Jan 2002
Location: Cardiff
Posts: 2,219
It might be a problem with FTP'ing the file.

Remember to always FTP pl files in ASCII mode.
Brian is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISO 8583 Message Parser in C? nadeer78 Projects and Job Recruitment 7 06-16-2008 12:56 AM
In a game Engine... Shamino Game Programming 28 02-19-2006 11:30 AM
singly linked to doubly linked jsbeckton C Programming 10 11-06-2005 07:47 PM
how to implementate a registration script TJa C++ Programming 0 10-28-2005 02:33 AM
Dikumud maxorator C++ Programming 1 10-01-2005 06:39 AM


All times are GMT -6. The time now is 04:01 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22