You're spot on, something else is causing it. In my experience, I found that the print "content-type: text/html\n\n"; script has to be my second line of the script, right after #!/usr/bin/perl, as I will mostly catch anything else after that.

Run the perl script manually, and look at the output. See if anything obvious pops up. Secondly, change your code, and look at anything between the start of the script and where you have the print "content-type: piece.

There are only so many things that can cause a CGI to crash. The most difficult ones, is when a script does something, it fails, and you don't do any error checking on that. That will keep you busy for a while, especially if you start dealing with DBI's, where you get database errors before you even print the display out.


In reply to Re: Re: Perl 500 Internal Server Error by Massyn
in thread Perl 500 Internal Server Error by tohann

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.