php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #10700 unlink() doesn't like win/unc names
Submitted: 2001-05-07 07:12 UTC Modified: 2003-12-27 20:09 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: djanix at hotmail dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0 Latest CVS (2001-05-07) OS: win32
Private report: No CVE-ID: None
 [2001-05-07 07:12 UTC] djanix at hotmail dot com
unlink( '//becker/c$/winnt/system32/dns/BOOT' ); 
or any other file with unc names gets
Warning: Unlink failed (Invalid argument) 

THANKS FOR UNC SUPPORT in 4.0.6 !!!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-23 14:31 UTC] sander@php.net
The problem is that //becker/c$/winnt/system32/dns/BOOT is not a real filename.
Changing to feature request.
 [2001-10-23 14:46 UTC] djanix at hotmail dot com
how is it not a real filename ?!

[\\becker\c$\winnt\system32\dns]dir

 Directory of  \\becker\c$\winnt\system32\dns\*

10/19/2001  17:57         <DIR>    .
10/19/2001  17:57         <DIR>    ..
10/19/2001  17:57         <DIR>    backup
 9/18/2001  10:32         <DIR>    generated
 8/12/2001  15:58          72,681  boot
 5/07/2001   1:43          61,681  BOOT.bak
 6/01/2001  11:48             380  BOOT.template
 8/12/2001  15:59           1,391  cache.dns
10/19/2001  17:57               0  dns.log
...

  just in case there was some confusion...
 [2001-10-23 14:53 UTC] sander@php.net
It's not a local, regular file. You can compare it to something like http://host/file.txt
To delete a file like that, you need some network-stuff to handle the connection. That is not (yet) implemented in PHP.
 [2001-10-23 15:41 UTC] djanix at hotmail dot com
  yeah but a call to standard unlink() will work...

  unlink( "//rhodes/d$/test.txt" ); 

  from the same or another machine works just fine.

  i suppose u'r saying that the '//' will signal a wrapper to call the proper unlink code, that's different, but it still doesn't seem like a feature request, when a previously added feature was 'unc pathname support'...

  but oh well, i can fix with a wrapper around php unlink() that can use exec() to get the job done, but that's obviously not a great solution...

 [2003-12-27 11:44 UTC] andrew at bramp dot freeserve dot co dot uk
It appears this bug has been fixed. Its working fine on 4.3.4
 [2003-12-27 20:09 UTC] derick@php.net
cool, closing then.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 14 11:01:29 2024 UTC