RE: [PHP] rename?
I think you can rename it by using a full path. Have you tried it yet? Cheers, Maxim Maletsky -Original Message- From: Miguel Loureiro [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 12:02 AM To: php-gen Subject: [PHP] rename? Hi , having a hierarchy of directories, like A\b\d, A\c, I would like to move directory A\b\d to A\c\d , to (try) to get it I test something like rename(d,".. / c/d"), but I get " Warning: Rename failed (No such file or directory) in ", it's necessary create the directory first, I mean , Mkdir(second_d) ? but the command its RENAME... or there are other, better , ways to do what I want. Consider that the directory d have lots of things (files and directories...). T.Y Best Regards Miguel Loureiro <[EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] rename problem...
Hi Martin, Question: who actually OWNS the document? Does it have your logname and group? If you're trying to do a rename from the server, remember that the server generally runs as "apache" or "nobody"... and to coin a phrase, "nobody" owns nothing. If you're trying to manipulate files in your own home directory (or http_docs or whatever suffices as your servable area), you have just about two choices. Either make the documents you're working with owned by nobody (not really a good idea) or make a virtual web server in Apache that has the appropriate User and Group directives to make that virtual server run "as" you on your behalf. About 5 minutes of httpd.conf configuration and a quick DNS trick. We've all tripped-up on this one at one time or another. It's not much setup either way, but whatever you do, make sure that YOUR security and the security of your server come before all other considerations. Best regards, Bill -Original Message- From: Martin [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 09, 2001 7:20 AM To: [EMAIL PROTECTED] Subject: [PHP] rename problem... Hi! When i'm trying to run this script: I get this error: Warning: Rename failed (Permission denied) in C:\Inetpub\WEBS\mysko\uploads\rename.php on line 4 The directoy has change permissions. What am i donig wrong...? /martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Rename a File?
mv filename newfilename - Original Message - From: "Randy Johnson" <[EMAIL PROTECTED]> To: "Randy Johnson" <[EMAIL PROTECTED]>; "Chris Lambert - WhiteCrown Networks" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, July 13, 2001 12:53 PM Subject: [PHP] Rename a File? > How do I rename a file on Linux in PHP? > > Thanks > > Randy > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Rename a File?
http://php.net/rename > -Original Message- > From: Randy Johnson [mailto:[EMAIL PROTECTED]] > Sent: 13 iulie 2001 20:53 > To: Randy Johnson; Chris Lambert - WhiteCrown Networks; > [EMAIL PROTECTED] > Subject: [PHP] Rename a File? > > > How do I rename a file on Linux in PHP? > > Thanks > > Randy > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] rename a directory
on unix I think it should work for both.. can't say I know on windows.. also, why not try exec or system and just run the normal system command for it? - Original Message - From: "Jeff" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 24, 2001 6:07 PM Subject: [PHP] rename a directory > Does anyone know how to rename a directory? There is rename() for files > but I couldn't find anything for directories... > > Thanks, > > Jeff > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] rename a directory
Yes, rename() does work on Windows as well as on *nix. -Original Message- From: Tom Carter [mailto:[EMAIL PROTECTED]] Sent: 24 July 2001 17:54 To: [EMAIL PROTECTED]; Jeff Subject: Re: [PHP] rename a directory on unix I think it should work for both.. can't say I know on windows.. also, why not try exec or system and just run the normal system command for it? - Original Message - From: "Jeff" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 24, 2001 6:07 PM Subject: [PHP] rename a directory > Does anyone know how to rename a directory? There is rename() for files > but I couldn't find anything for directories... > > Thanks, > > Jeff > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] rename a directory
Thanks! Next time I won't assume it won't work... Jeff Tom Carter wrote: > on unix I think it should work for both.. can't say I know on windows.. > > also, why not try exec or system and just run the normal system command for > it? > - Original Message - > From: "Jeff" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, July 24, 2001 6:07 PM > Subject: [PHP] rename a directory > > > Does anyone know how to rename a directory? There is rename() for files > > but I couldn't find anything for directories... > > > > Thanks, > > > > Jeff > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]