shutey Posted November 17, 2007 Share Posted November 17, 2007 This works perfectly $old = "I:/www/photos/local/old_folder_name"; $new = "I:/www/photos/local/new_folder_name"; rename($old,$new); But this says 'Permission Denied' $old = "I:/www/images/clip/old_folder_name"; $new = "I:/www/images/clip/new_folder_name"; rename($old,$new); chmod for both old folders is 777 though I have tried 755 but it made no difference. All code is running on a local machine The I: drive is a USB HDD diectly connected. I am using PHP4 on Apache2 on WinXP Pro - all windows folder properties are identical. I am the owner user and also the installer of PHP and Apache I am baffled why it will work for one folder and not the other What am I missing - any suggestions? Thank you Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 17, 2007 Share Posted November 17, 2007 you will not be able to rename a folder if any of the files in the folder are open.. check that.. or that folder is being viewed in explorer Quote Link to comment Share on other sites More sharing options...
shutey Posted November 17, 2007 Author Share Posted November 17, 2007 Thanks but images are not the problem. The form does display a sample image from within the folder to be renamed but on submission of the form the renaming is carried out before the form is re-displayed. This is the same for both the working form and the failing form. In addition, to avoid the database being updated with the new name when the folder has not been renamed I use rename($old,$new) or die('Rename Failed!'); So if it fails the form is not re-displayed and therefore nor are any images. There are no other instances of IExplorer open or any other software e.g., Windows Explorer that is using or viewing the folder. Thanks for the suggestion - any other ideas? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.