|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39550 unlink() does not work if filename contains parenthesis.
Submitted: 2006-11-17 22:42 UTC Modified: 2006-11-20 15:43 UTC
From: andy at advancethermal dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 5.2.0 OS: Windows XP Pro & 2003 Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
32 - 21 = ?
Subscribe to this entry?

 [2006-11-17 22:42 UTC] andy at advancethermal dot com
unlink() does not delete a file if the filename contains parenthesis, while functions like file_get_contents() work fine.

Reproduce code:
$file = "c:/my file (4).txt";


Expected result:
Expect file to be deleted.

Actual result:
File is not deleted.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-20 10:00 UTC]
Do you see any error messages with error_reporting(E_ALL)? If yes, please post all of them here.
 [2006-11-20 15:43 UTC] andy at advancethermal dot com
Okay, I have no idea why, but both servers can delete files with parenthesis now. Please consider the issue as closed/bogus.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 08 01:03:53 2023 UTC