Oh that's right, I forgot we're dealing with CGI. Your system administrator would be able to tell you where the webserver's error logs are. You'll need to check them for the specific error. On my system they're in /var/log/apache2/ and the file I look at is error.log. I also have a symlink to the apache logfile path in my home directory at ~/web/apache2logs for convenience (that keeps them close to where I do my work).

You may also be able to use the CPAN module CGI::Carp with its fatalsToBrowser() function, but that's for development, usually not production (you usually don't want an error message going to the browser that everyone can see, particularly if it exposes details about your server or script).

-f works on the current directory, or on a full path, or on a relative path (relative to the current working directory). But whatever $dir path works for you for opening the files, it will also work for you with the -f test, so that snippet of code I posted in my previous response should set you straight if my theory is accurate as to why it's failing. But without seeing the error it's just a theory.


Dave


In reply to Re^5: Using FastCGI by davido
in thread Using FastCGI by jonc

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.