#40117 [Bgs->Opn]: Unable to access mapped network drive
| From: | jsbruns at selectionsheet dot com | Date: | Sat, 13 Jan 2007 14:51:06 +0000 |
| Subject: | #40117 [Bgs->Opn]: Unable to access mapped network drive | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107563@lists.php.net to get a copy of this message | ||
ID: 40117
User updated by: jsbruns at selectionsheet dot com
Reported By: jsbruns at selectionsheet dot com
-Status: Bogus
+Status: Open
Bug Type: Filesystem function related
Operating System: Windows 2003 Server
PHP Version: 5.2.0
New Comment:
Thanks for your reply, however I have tried using a variety of methods,
including escaped backslashes within double quotes and single backslash
within single quotes.
I am still unable to open a file/dir on a mapped network drive.
$dbf = fopen('F:\W_54602.DBF','rb');
Warning: fopen(F:\W_54602.DBF) [function.fopen]: failed to open stream:
No such file or directory in C:\httpd\dbf_class.php on line 2
Previous Comments:
------------------------------------------------------------------------
[2007-01-13 12:56:04] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
You need to use \\ instead of a single \ in double quotes.
$dbh = opendir("F:\\W_54620.DBF","r");
or use single quotes
$dbh = opendir('F:\W_54620.DBF',"r");
------------------------------------------------------------------------
[2007-01-13 04:57:06] jsbruns at selectionsheet dot com
Description:
------------
I'm running windows 2003 server and have several mapped drives within
my network. I'm trying to access a file on a drive mapped as F:\
I can access the drive from windows explorer and am running apache as a
service under an administrative user that has proper permissions.
I've tried a variety of connection methods including specifying the
drive letter, the server name and the IP address. All with no success.
Any help would be appreciated.
Reproduce code:
---------------
$dbh = opendir("F:\W_54620.DBF","r");
$dbh = opendir("\\server02\W_54620.DBF","r");
failed to open dir: Invalid argument in C:\httpd\dbf_class.php on line
2
Expected result:
----------------
Provide a valid object after successful file open.
Actual result:
--------------
Unable to open stream to file on network drive.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40117&edit=1