Edit report at https://bugs.php.net/bug.php?id=52376&edit=1
ID: 52376
Comment by: alexkyrlis at me dot com
Reported by: ryan at kisc dot edu dot np
Summary: opendir() cannot open UNC paths in IIS7 using
passthrough auth.
Status: Assigned
Type: Bug
Package: *Directory/Filesystem functions
Operating System: win64 - W2008R2
PHP Version: 5.3.2
Assigned To: pajoye
Block user comment: N
Private report: N
New Comment:
Greetings,
I have the same problem, expect that, when testing this script:
<?PHP
error_reporting(E_ALL);
opendir("//node1/wwwroot/public/joomla");
?>
I get no errors, PHP actually likes this path, no problem.
But, this same path is not accepted by Windows. Instead, the correct path that
Windows 2008 (and IIS) recognizes is:
\\node1\wwwroot\public\joomla
This is quite an annoying problem. Windows likes \ and php likes / in the path.
Any ideas?
Thanks
Alex
Previous Comments:
------------------------------------------------------------------------
[2012-02-08 19:37:33] mike dot riendeau at gmail dot com
I fixed this in Win7 IIS7 Through the inetmgr.
WebSite->Authentication->Anonymous Authentication (edit on side panel)
I changed the Specific User (IUSR) to Application pool identity.
I am only using it for local development, so I'm not sure how this affects
security.
------------------------------------------------------------------------
[2011-10-13 09:57:29] em at ducommun dot ch
I have exactly the same problem.
I have tried to map the share to a letter, exemple Z:/ same result.
This is not a permissions problem.
Please help.
Config: xampp running under w2k3r2 server, with php 5.3.5
Thanks!
------------------------------------------------------------------------
[2011-08-05 15:14:58] marc dot seitz at ww-informatik dot de
Hi Guys,
we have exactly the same problem now.
We want to migrate to Windows Server 2008 R2 with IIS 7.5, FastCGI, PHP 5.3.6.
When I try to do a file_get_contents(<UNC-PATH>) or opendir(<UNC-PATH>) I
always will get the error:
Warning: fopen(<UNC-PATH-TO-FILE>): failed to open stream: Permission denied in
D:\inetpub\wwwroot\XXX.php on line 26
The Application-Pools of the IIS are running under a Domain-Account which has
access to the Network Share.
I don't know how to solve this problem.
Any ideas of you?
Thanks
Marc
------------------------------------------------------------------------
[2011-01-13 04:24:50] mark at internode dot on dot net
Hi I am having the same problem with PHP 5.3.5 running under IIS 7.5, FastCGI,
Windows Server 2008 R2 where I am simply trying to access a file on another
server using a UNC path.
$uploadfile = "\\<server>\<share>\<folder>\<file>.txt";
$fh = fopen($uploadfile, 'r') or die("Can't open file $uploadfile");
I have tried granting "everyone" full permissions for the share and the file
system but it still does not work.
This code works perfectly if the file is stored on the same server and is
accessed through a local path.
Other things I have tried inlcude:
- setting the defaultappool to use a specific user and granting that user
permissions on the share and file system
- using "network" as above
Any other ideas on this one?
------------------------------------------------------------------------
[2010-07-20 04:42:43] [email protected]
(Restoring status.)
As a fellow Chrome user, I feel your pain. :)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=52376
--
Edit this bug report at https://bugs.php.net/bug.php?id=52376&edit=1