Thread: "Premature end of Script Headers"

  1. #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.

  2. #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.

  3. #3
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,212
    It might be a problem with FTP'ing the file.

    Remember to always FTP pl files in ASCII mode.

Popular pages Recent additions subscribe to a feed

Similar Threads

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