Jump to content

Strange problem renaming folders


shutey

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.