php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1293 UNC (\\server\share) pathnames don't work
Submitted: 1999-04-05 14:22 UTC Modified: 1999-04-05 17:30 UTC
From: mnc at nih dot gov Assigned:
Status: Closed Package: Other
PHP Version: 3.0.7 OS: NT
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: mnc at nih dot gov
New email:
PHP Version: OS:

 

 [1999-04-05 14:22 UTC] mnc at nih dot gov
$fp = fopen("\\server\share\file.txt");

fails, apparently because the doubled slash is removed by line 139 in fopen_wrappers.c prior to path validation. 

For this reason, escaping the path using a syntax such as "\\\\server\\share\\file.txt" can not work.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-04-05 17:30 UTC] sas
The backslash is the escape character of PHP3. You should write it as

fopen("\\\\server\\share\\file.txt");
--
Ok, patch is in CVS, change will appear in PHP 3.0.8.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Fri Jul 03 17:00:02 2026 UTC