My post wasn't addressing your OP, just the misinformation that you have to use doubled backslashes instead of slashes on Windows.

To address your problem, I think that you need to follow the advice of the other posters and add a  die $!; clause to your open and come back and tell us what error you are getting when the open fails.

My guess (note: I do very little web server programming), is that the userid that your web server is running under is not allowed to access files/directories below your cgi-bin directory, and the error you are getting is "Permission denied".

There are two ways of addressing that problem.

  1. Give your web server userid appropriate permissions to read the directory you are trying to access.

    I don't think that this is advisable as you are opening up your parts of your directory structure that should not be accessible from via the web server account. YOU PROBABLY SHOULD NOT DO THIS UNLESS YOU KNOW WHAT YOU ARE DOING OR TAKE ADVISE FROM SOMEONE WHO YOU TRUST DOES!

  2. Move the files you need your web server account to access into (a subdirectory) within your cgi-bin directory.

If you *really* cannot put the files you are trying to access within/below you cgi-in directory, and if you are using NTFS on your webserver, you might also consider creating a junction to map the directory you need to access to a position within your cgi-bin directory. Note: You will need to read and understand the link I gave you, particularly the bit about using ACLs you secure the link.

You'll also need to obtain the tools for doing this. I'd recommend you look at SysInternal's Junction utility, but make sure you understand the implications of doing this.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

In reply to Re^4: File Open Issue by BrowserUk
in thread File Open Issue by Anonymous Monk

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.