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:18
Avg. Score:4.3 ± 1.0
Reproduced:15 of 18 (83.3%)
Same Version:7 (46.7%)
Same OS:8 (53.3%)
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
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 30 21:01:29 2024 UTC