Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??
Good stuff! I just wanted to stress the importance of adding the following line to your CGI script while debugging:
use CGI::Carp qw(fatalsToBrowser); # You are using CGI, right?
Now all fatal errors are echoed to the browser as well as the error log file. This is a must if you can't view the web server's error log. If that is the case, then perl -cw foo.cgi is also a must.

Also, if you find yourself on a foreign ISP's box, having to fix someone's CGI script, and there is no /etc/httpd/logs/error_log, you can find which error log file is being used by Apache by searching through [path to apache root]/conf/httpd.conf

Apache isn't always located in /etc/httpd/. When I install Apache on a box, I always install it in /usr/local/apache/. The mileage varies. :)



In reply to (jeffa) Re: Easier Linux/Unix remote CGI Debugging by jeffa
in thread Easier Linux/Unix remote CGI Debugging by Hero Zzyzzx

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.