|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31741 Error while opening remote file
Submitted: 2005-01-28 15:48 UTC Modified: 2005-02-02 04:21 UTC
From: rvk at au dot ru Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 5.0.3 OS: Windows XP
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: rvk at au dot ru
New email:
PHP Version: OS:


 [2005-01-28 15:48 UTC] rvk at au dot ru
I need to load .csv file from remote computer. When I run php like command-line script - result found. Remote file opening and display correctly, but when I run my php file at IIS, rarely! file opening correctly. Browser display: "failed to open stream: Permission denied in ...". Remote file have "readonly" attributes and stored at computer with Windows-98 operation system. At same time no one program will read or write this file. The "read" rights on file set for everyone, not for me only.
Catalog with this file shared for local intranet.
That may be wrong? 

Reproduce code:
$file = file("\\\\remote_computer_name\\catalog\\myfile.csv");
$file[0] = explode(",", $file[0]);
foreach($file[0] as $key => $field) echo $field."\n";

Expected result:

Actual result:
Warning: file(\\Mac2111\var\01_01_2005\arh_3.csv) [function.file]: failed to open stream: Permission denied in c:\Inetpub\wwwroot\php\get_fields.php on line 20


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-29 17:08 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Under a default configuration, IIS runs as IUSER_YOURCOMPUTERNAME which is a local users account with access rights on the local computer only.  In order for IIS to access files on a remote computer it must have an account on that remote computer with a matching username and password.

It works at the command line because it's using your account credentials at that point.
 [2005-01-30 15:06 UTC] rvk at au dot ru
I know, that IIS working as IUSR_COMPUTERNAME account... But rarely! it working properly and I see my data at browser... Otherwise I should not post this message as bug report. :-(
 [2005-02-02 04:21 UTC] rvk at au dot ru
Yes, this is no PHP issue.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 21 07:01:29 2024 UTC