Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 13 of 13

Thread: cgi-bin~perl

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Seattle, WA, USA

    The problem with your script is the very first print statement:
    print "content-type: text/html\n\n\";  <-- Remove the \ before the final quote
    Now then, I've uploaded the fixed script to my own webserver, and it doesn't have an IP address.

    The CGI that I know makes use of the CGI module, which contains a function called remote_host() which, as you might imagine, prints out the remote host.

    Unfortunately, I don't know what's wrong with the way you've done it; my assumption is that the environment variable may not be called $REMOTE_HOST. Try and see if there's another way to do it.

  2. #12
    ok i type and this is what i got
    Server error!

    The server encountered an internal error and was unable to complete your request.

    Error message:
    Premature end of script headers: 12.cgi

    If you think this is a server error, please contact the webmaster

    Error 500
    Sun 01 Jan 2006 01:03:33 PM CST
    Apache/2.0.40 (Red Hat Linux)
    this is same code i did but name it 12.cgi

  3. #13


    can give me a perlscript to make a simple form submit and the how to view the results

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts