×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

network folder inaccessible from php is_dir function

network folder inaccessible from php is_dir function

network folder inaccessible from php is_dir function

(OP)
Is there a way to read a network folder with php?
I've tried using the "\\drive\folder\" and also using the mapped drive letter.
I keep getting "no folder by that name" error.

I have administrator privileges on that server, so I don't think it's a rights issue.

I also tried escaping the backslashes, using doubles, but the results are the same.
Also tried using forward slashes every which way.

Is this doable at all?
Thank you for your help.

RE: network folder inaccessible from php is_dir function

It doesn't matter what your rights are, it matters what rights the PHP process has. To enable any access obviously is a security issue for a public website, where access is limited to webroot and below.

If this is just about localhost and you absolutely want to let PHP have all rights (quite like an executable compiled in any other language executed with your login), then you may change from the defaults.

What to do depends on your OS, that could also be MAC or anything else. You can figure it out with a little googling once you understand this:
1. PGP is run from the Webserver, that moight be Apache.
2. Processes started by some service account inherit the permissions of the system account that runs that and are equal or lower.

The normal solution to get access to files outside webroot is to add those folders via Aliases, not to higher permissions. It would also perhaps be better to run Apache on the computer where that directory is local, as the Webserver runs on local accounts only having local drives access.

Bye, Olaf.


Olaf Doschke Software Engineering
https://www.doschke.name

RE: network folder inaccessible from php is_dir function

(OP)
Thank you, Olaf:
I'll research this and try your solution.
Ciao.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close