I'm kinda new at Perl myself (being reformed from days as an amatuer Java geek). Chromatic (an old college friend) refered me to perlmonks. I have moved to a new server and am consitently getting 500 errors trying to run simple scripts (even hellocgi.cgi that comes with Apache bundled with Indigo Perl). I can execute the scripts fine, locally, using Apache, but on my server they consistently throw 500 errors. File permissions are set to 775, and the shebang is all good. I can't get it to work, but Ovid said something that made me want to ask a question:

Ovid wrote:
You're not sending any output back to the client, so your error log is probably complaining about "Premature end of script headers". That doesn't mean your program is wrong, just that you either need to run it from the command line or convert it to a proper CGI program.

The program works from the command line (obviously, PuTTY won't render the HTML). And it works locally. The phrase "convert it to a proper CGI program" caught my attention, though. In Java everything got compiled into classes. I can't imagine needing to do that to a Perl script. What did you mean by the statement?

Thanks,
Mike

In reply to Re: (Ovid) Re: dbi 500 error by Anonymous Monk
in thread dbi 500 error by Anonymous Monk

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.