There are web statistics gathering solutions such as webalizer you might want to look at.

Generally - when I get a premature end of headers or malformed headers error I have a bug in my script.

You can run scripts from the command line to see what it returns and debug there first.

You could also use telnet on port 80, request one of your pages and see what the response is from that. Maybe you are using this technique already.

I imagine this exec call is simply incrementing numbers to some file(s) or DB table(s) and that you have some other script which reads the data back.

From the exec documentation, if you are using -w or use warnings; and use an exec without a following die, warn or exit then Perl will complain.

Check the permissions and accessibility of the program being exec'd and consider using the system call.

Also consider using use CGI::Carp qw(fatalsToBrowser); to help debug what's happening.

Let us know how you get on.


In reply to Re: Cgi script with no output to webpage? by LesleyB
in thread Cgi script with no output to webpage? by pot1906dk

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.