Re: Access to network shares
| From: | Nicole Amashta | Date: | Wed, 06 Feb 2002 21:56:18 +0000 |
| Subject: | Re: Access to network shares | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-11882@lists.php.net to get a copy of this message | ||
I first posted to this newgroup with this very problem.
To fix, assuming you are on NT or Win2k and running apache as a service, you
would change the service from localhost to a specific
user with that user given the proper permissions. The user would be setup on
the machine you are trying to access over the network.
start > programs > administrative tools > services
change the apache service "log on as" to an existing user with the login and
password assigned to it.
need further help? let me know.
good luck!
nicole amashta
www.aeontrek.com
==========================
"Michael A. Fallavollita" <mikef@microtech.com> wrote in message
news:20020206204610.26874.qmail@pb1.pair.com...
> It seems impossible for me to use file system and directory functions that
> attempt to access network drives on another server.
>
> For example, take the dir() example from the manual:
>
> <?php
> function getDirList($dirName)
> {
> $d = dir($dirName);
> while($entry = $d->read())
> {
> if ($entry != "." && $entry != "..")
> {
> if (is_dir($dirName."/".$entry))
> {
> getDirList($dirName."/".$entry);
> }
> else
> print("$entry<br>\n");
> }
> }
> }
>
> getDirList("//server/share/dir");
> getDirList("S:\\dir");
> ?>
>
> If S: is mapped to \\server\share then the above will fail with:
> Warning OpenDir: Invalid argument (errno 22) in ....
>
> I've tried using '/', '\' (properly escaped) and UNC names.
> I've given full control permissions both via the filesystem and the share
to
> the user.
>
> I'm sure I'm missing something.
>
> -- Mike Fallavollita
> mikef@microtech.com
>
>
>