|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61485 rename('..', '..') doesn't report a warning
Submitted: 2012-03-23 00:30 UTC Modified: 2013-02-18 00:35 UTC
From: juzna dot cz at gmail dot com Assigned:
Status: No Feedback Package: Directory function related
PHP Version: 5.4.0 OS: Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: juzna dot cz at gmail dot com
New email:
PHP Version: OS:


 [2012-03-23 00:30 UTC] juzna dot cz at gmail dot com
This command executed in shell fails:
mv .. ..

but the same reports no error in PHP:
rename('..', '..')

(I think it reports error on windows)

Test script:
rename('..', '..')

Expected result:
Warning: rename(..,..): .....

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-23 00:31 UTC] juzna dot cz at gmail dot com
Tested on 5.4.0, 5.4.1-RC1, 5.3.10, 5.3.9
 [2012-03-24 16:11 UTC]
-Status: Open +Status: Feedback
 [2012-03-24 16:11 UTC]
Cannot reproduce the issue.

The command return FALSE as expected and outputs a "Device or resource busy" error 
 [2012-03-25 15:27 UTC] juzna dot cz at gmail dot com
Weird, reports no error on my PC:
Though I asked my friends and it works as expected for them.

Perhaps it's caused by my kernel (2.3.32), will double check with newer one
 [2013-02-18 00:35 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 12:01:29 2024 UTC