Jump to content

Error With Rename() Function


villermen
 Share

Recommended Posts

Ok, I'm trying to use this script:

if (file_exists("D:/website/account/leden/" . $name_old))	  rename("D:/website/account/leden/" . $name_old,"D:/website/account/leden/" . $name_new);

To rename a certain directory.The links used are all valid, and I'm running PHP on a computer with admin rights.Still I get this error message:PHP Warning: rename(D:/website/account/leden/oldname,D:/website/account/leden/newname) [function.rename]: Permission denied in ...fileWhat's going wrong here, and how can I fix this.Thanks.VillermenSOLUTION:Some map setting for windows explorer was checked where it should be unchecked.Help for this can be found here

Edited by villermen
Link to comment
Share on other sites

Ok, now I got two options, I can change the properties in the folder at explorer, or at IIS.I think you meant the one in explorer, so I'm trying to say what I try to do:On the map before the map I want to change (D:\website\account\leden), I checked his properties.Then I click the tab "Delen via het web" (something like share over the web in english), and in that tab is something from IIS (so I think I'm at the right place).Here I can choose to share the map, with an alias. I'm stuck here, what do I need to fill in here?Gr.VillermenAnd already thanks for all the help

Link to comment
Share on other sites

I can't find any tab with security in the name, but in the tab named sharing, there are 2 sections named sharing and security. One sharing and security: local, and the other sharing and security: the network.I've translated all those names myself, so it could be named a bit different in XP EN.

Link to comment
Share on other sites

That would be PHP, but I'm really lost now.I've got 1 account on this computer, that is an admin.If I want to create a user account, I have to make another admin account first.That's for the accounts.I really don't know what to do next.I saw this security tab in the tutorial, but when I did the exact same thing to show it, it wouldn't show..So I'm lost...

Link to comment
Share on other sites

Sorry, I forgot which forum I'm in, most of time time I set permissions for IIS it's because of ASP. Same rules for PHP though. If you're not seeing the permissions panel it sounds like you're not an admin, if you were an admin that permissions page should be showing up in the properties for the folder. I've never had to create a new user account for this though, I guess these are the steps I take:Log in as adminRight-click the folder, choose PropertiesClick Security tabAdd the IIS user to the list of users with permissionGive the IIS user modify or full control over the folderThe IIS user account already exists, you don't have to create that. Just out of curiosity, which version of XP are you doing this with? Also, I noticed that I never actually asked if you're using IIS, are you using that or do you have Apache or something else?

Link to comment
Share on other sites

Well, I know my current and only account is an admin account.I even created another admin account to test if it worked there, same problem.

The IIS user account already exists, you don't have to create that. Just out of curiosity, which version of XP are you doing this with? Also, I noticed that I never actually asked if you're using IIS, are you using that or do you have Apache or something else?
Uhm, I'm using XP SP3, and yes, I'm using IIS (v5.1) Edited by villermen
Link to comment
Share on other sites

I'm not sure if you're right-clicking inside IIS, but don't go through IIS, just open Windows Explorer and right-click on the directory there. IIS has its own set of properties for directories, you want to access the regular Windows properties. The screen you showed isn't the one you're looking for, you don't want to share this directory, only set the security for it.Check here:http://www.google.com/search?client=opera&...-8&oe=utf-8

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...