Page 1 of 1

PHP - rename error - please help

Posted: Tue Oct 26, 2010 4:40 am
by puzzled
i'm trying to make a function in order to move images to another folder, i'm using rename function but i have problems on getting it to work.
this is what the error says..

Warning: rename(wp-content/gallery/shirts-gallery/thumbs/thumbs_1288084826.jpg,wp-content/gallery/shirts-gallery/1288084826.jpg) [function.rename]: No error in E:\Xampp\xampp\htdocs\wordpress2\wp-content\plugins\nextgen-gallery\view\gallery.php on line 83

can anyone please help? I don't understand the error :(

Re: PHP - rename error - please help

Posted: Tue Oct 26, 2010 8:52 am
by twinedev
I did a quick check and found this bug report for PHP, the ending message in the thread says it has been updates (July 2009)

http://bugs.php.net/48771

May want to check with whoever maintains your server and see if that is the issue with yours.

Also I found another thread that mentioned at one point in the contributed notes on PHP it was said that this error also comes up on windows systems when the target file already exists. (i couldn't find this, but may be worth checking, do a file_exists() first, if so unlink().

-Greg

Re: PHP - rename error - please help

Posted: Tue Nov 02, 2010 10:25 pm
by puzzled
thank you for the reply.

I noticed that the error occurs because i'm working it inside wordpress, anyone know how to rename file inside wordpress?