Bug #73231 [Opn->Nab]: Cannot read file on network drive using any file funtions
| From: | requinix@php.net | Date: | Mon, 03 Oct 2016 06:00:41 +0000 |
| Subject: | Bug #73231 [Opn->Nab]: Cannot read file on network drive using any file funtions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-204415@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73231&edit=1
ID: 73231
Updated by: requinix@php.net
Reported by: rahulnamin84 at gmail dot com
Summary: Cannot read file on network drive using any file
funtions
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: Windows 7
PHP Version: 5.6.26
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2016-10-03 04:52:19] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73231&edit=1