Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Permission problem with rename.
Old 09-27-2008, 10:42 AM Permission problem with rename.
Experienced Talker

Posts: 33
Name: Toby Osbourn
Trades: 0
I have been playing about with the rename function (see code snippet below) If the rename is changed so they both happen in /randomgall/ there is no problem, but as it as (with the renamed directory going to /gallerytest/) I get the following error... Warning: rename(i/randomgall/blahblahblah/,i/gallerytest/blahblahblah-09-27-2008/) [function.rename]: Permission denied in /home/....
Code:
 mkdir("/home/justbond/public_html/i/gallerytest/".$newgalname, 0410); chmod ("/home/justbond/public_html/i/gallerytest/".$newgalname, 0777); sleep(5); rename("i/randomgall/$pickedgal/", "i/gallerytest/$newgalname/");
tosbourn is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-28-2008, 12:37 AM Re: Permission problem with rename.
Mattmaul1992's Avatar
Ultra Talker

Posts: 486
Name: Matt
Trades: -1
So you want to move a file frome one dir to another? Use the copy/move_uploaded_file function instead. I'm probably not understanding your question though.
__________________
PHP Code:
$talkupation++; 

Please login or register to view this content. Registration is FREE
- Free IPB forum hosting (releasing today!!!), no ads, free modifications
Mattmaul1992 is offline
Reply With Quote
View Public Profile
 
Old 09-30-2008, 03:05 AM Re: Permission problem with rename.
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
Also you cannot move files to not existing directories. Move() does not create directories on demand.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Reply     « Reply to Permission problem with rename.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11447 seconds with 12 queries