php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39256 rename() destroys images
Submitted: 2006-10-25 14:49 UTC Modified: 2006-10-25 17:00 UTC
From: krausbn@php.net Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 5.1.6 OS: MacOS X
Private report: No CVE-ID: None
 [2006-10-25 14:49 UTC] krausbn@php.net
Description:
------------
Before I begin: I'm using MacOS X 10.4.8 with "PHP Version 5.1.6 www.entropy.ch Release 1 (Universal Binary)" perhaps it's related only to this release?!

When I use rename() to move an image file from $src to $dest the Finder (Explorer on Windows) tells me that the file is corrupt. If I use copy() + unlink() instead everything works fine.
I think this is a only Mac related problem with the file header but I'm not sure with this ...

Reproduce code:
---------------
rename($src, $dest);

vs.

copy($src, $dest);
unlink($src);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-25 15:01 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 [2006-10-25 15:35 UTC] krausbn@php.net
Sorry, but haven't you read the stuff in the second paragraph?!!
If the rename() function doesn't do the same as copy() + unlink() than it seems obvious that there is a bug in PHP - even it's only on the Mac, right?!
If you don't agree with me than just give me a hint why not.
Regards
Bjoern
 [2006-10-25 15:46 UTC] tony2001@php.net
It's quite easy - if you didn't try the snapshot, didn't explain what means "corrupted" to you, didn't provide a reproduce case, then most likely the whole problem is bogus.

 [2006-10-25 16:07 UTC] krausbn@php.net
OK, I see. Just because I don't want to destroy my own developement environment with a snapshot and I'm not that freaky to see where PHP has a problem with simply renaming images the hole thing is bogus, eh?!
That's realy a cool way to fix bugs or negate them! If the user hasn't enough skills we don't have to fix anything. Keep on buddy, that's realy the way we make PHP better! :(
 [2006-10-25 17:00 UTC] tony2001@php.net
No useful info -> bogus.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 03 08:01:31 2024 UTC