php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45535 Can not access Network Map Drive
Submitted: 2008-07-17 01:24 UTC Modified: 2008-07-25 01:00 UTC
Votes:17
Avg. Score:4.4 ± 1.0
Reproduced:14 of 17 (82.4%)
Same Version:7 (50.0%)
Same OS:7 (50.0%)
From: trikhoi at yahoo dot com Assigned:
Status: No Feedback Package: Directory function related
PHP Version: 5.2.6 OS: WindowXP SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: trikhoi at yahoo dot com
New email:
PHP Version: OS:

 

 [2008-07-17 01:24 UTC] trikhoi at yahoo dot com
Description:
------------
I can not access network drive by opendir() function. 

I've adjusted pemission D:\share for everyone can access it.

I've also tried to opendir("\\\\k:\\"), but the result is false.

With K: is network drive I've created and map to "D:\share" folder in my computer.

Please give me some instruction to solve this problem
Thanks in advance!
My code look like:



Reproduce code:
---------------
$fh = opendir("k:\");
if($fh == false)
{
   print("can not open directory!");
}
else
{
   print("Openning directory successful!");
}

Expected result:
----------------
Openning directory successful!


Actual result:
--------------
can not open directory!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-17 01:30 UTC] jani@php.net
Turn on error display and level to E_ALL to see what the actual error is..
 [2008-07-19 09:10 UTC] carsten_sttgt at gmx dot de
> I can not access network drive by opendir() function. 

For network shares you should use UNC names:
"//server/share/dir/file.ext"

The PHP process must also have enough rights to this share:
e.g. with PHP-CGI or mod_php in Apache, the Apache service must have enough rights (the nomal "local service" account don't have this rights).
 [2008-07-25 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Sep 21 17:01:23 2020 UTC