php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73231 Cannot read file on network drive using any file funtions
Submitted: 2016-10-03 04:52 UTC Modified: 2016-10-03 06:00 UTC
From: rahulnamin84 at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.6.26 OS: Windows 7
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rahulnamin84 at gmail dot com
New email:
PHP Version: OS:

 

 [2016-10-03 04:52 UTC] rahulnamin84 at gmail dot com
Description:
------------
Following is my code


<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
echo file_get_contents("//TEST-WEB//wwwroot//cache//1.txt");
?>


when I run above code it will show following error


 Warning: file_get_contents(//TEST-WEB//wwwroot//cache//1.txt): failed to open stream: Permission denied in C:\inetpub\wwwroot\DevelopmentSource\test.php on line 8

Note: //TEST-WEB//wwwroot//cache//1.txt is network path

Expected result:
----------------
The script should display content of file 1.txt

Actual result:
--------------
It shows follwing  warning error message

Warning: file_get_contents(//TEST-WEB//wwwroot//cache//1.txt): failed to open stream: Permission denied in C:\inetpub\wwwroot\DevelopmentSource\test.php on line 8


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-03 06:00 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2016-10-03 06:00 UTC] requinix@php.net
The user account that PHP runs as in IIS, IUSR, doesn't normally have permission to access network locations. You have to configure that explicitly first.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 17:00:02 2026 UTC