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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Thu Oct 08 10:00:01 2026 UTC