Is the reason that you're unable to provide any error messages because your code is failing silently, because you have a policy against providing error messages when asking questions, or because you don't know where to find error messages in the server logs?

Without error messages, how do you know that the line you quoted is where the code is failing? You put print statements before and after that line to see if you arrived there?

If your code is failing silently, fix it. Since you didn't provide any code example, we can't tell you what exactly to fix, but I can tell you that anything that can fail should be checked, and errors logged. Any time you make an assertion as to the state of a component of your code, you should be checking that assertion. Did a regex match. Did a file really get opened? Did a file really get written to? Did a particular parameter really get passed? These are all things you can check programatically. And when you do check, if a state comes up where there's no point going on, you log it and die. If you can recover from it, you log it and recover.

If you have a policy against providing error messages when asking questions, change it so that your questions will become answerable.

If you don't know where to find error messages, you have to check the log files for your server. This will be different for different server configurations. Either you need to read the documentation for your server, or contact your server's administrator to ask where the error logs can be found. Without access to them, your CGI adventures will be painful and non-productive.


Dave


In reply to Re: CGI and security by davido
in thread CGI and security by AnnShinoy

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.