Hi everyone,
I am trying to test a CGI script that i am in the proccess of writing. I have Perl and IIS installed on my work computer, and i use this to test my script and it works fine, but when i upload it to my web host (using apache) to test it, it falls apart and gives me a 500 error, Internal Server Error. I tested the script on the server using SSH and perl and got the output below (the same as on my computer),
Content-Type: text/html <html> <head> <title>Search Page</title> </head> <body> <font style="font-family: Verdana, Arial, Helvetica, sans-serif; font- +size: 10px;"><form action="?op=search"> <input type="hidden" name="field" value="__FORM__"> <b>Search this database:</b><br>First Name: <input type="text" name="F +irst Name"><br> Email: <input type="text" name="Email"><br> Gender: <input type="radio" name="Gender" value="Male"> Male <input ty +pe="radio" name="Gender" value="Female"> Female <br> Recieve Promotional Material: <input type="checkbox" name="Recieve Pro +motional Material"><br> <input type="submit"> </form> <a href="?op=add">Add a record</a></font> </body> </html>
When i check the error log it says that the headers where cut short prematurely. But the only required header is Content-Type right?

Help would be appreciated...

In reply to Perl in CGI by monoxide

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.