Let me start off saying I have searched Perlmonks as well as the internets for answers. Obviously none were found.

Now, I have a Perl script, 'index.pl', that I am using as the home page of a website. I wrote it using CGI::Pretty and DBI (as well as CGI::Carp qw(fatalsToBrowser) - so don't bother suggesting that; it does not output anything other than 500 Internal Server Error). I have chmodded it to 755 as well - so it would be pointless to suggest that. I have tested another perl script:

#!/usr/bin/perl -Tw use strict; use DBI; use CGI::Pretty; use CGI::Carp qw(fatalsToBrowser); print "Content-type: text/html\n\n"; print "This is a URL test";

Which printed "This is a URL test". I tried moving the print $query->header; in index.pl to the fourth line (right after I use CGI) to no avail. I tested the syntax with the -c run time operator and Perl had no complaints. I checked the log file and it stated Premature end of script headers: index.pl which did not help at all because I am told (by the internets) that that error could be sundry problems.

I think I covered all the automated responses...

So - I ask (not limited to but including) you: what do I need to do to fix this issue?

Let me clear a few things up in case the solution is obvious and I have been looking at the code too long:

</wall_o'_text>

Update (15 hours after initial post): Got it working. I used ikegami's method of commenting everything out et cetera and found out the ftp client I was using failed at chmodding. Thanks for your help.

I'm so adjective, I verb nouns!

chomp; # nom nom nom


In reply to [Solved] Internal Server Error by Lawliet

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.