ftp_rename outputting warning command okay?.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Pejayuk
Forum Newbie
Posts: 2
Joined: Tue May 12, 2009 4:37 pm

ftp_rename outputting warning command okay?.

Post by Pejayuk »

Hi all,
I am new to FTP using PHP and was wondering if anyone knows why the ftp_rename function outputs the following warning when I use it correctly. The filename in $OldFilename exists in the current directory and gets renamed to the filename in $NewFilename, but it still outputs the warning?.

Here is the output error to the webpage.
Warning: ftp_rename() [function.ftp-rename]: Command okay. in /...........php on line 25
here is the PHP code.

Code: Select all

ftp_rename($ftp_conn_id, $OldFilename, $NewFilename);
 
Many thanks for your time.
Pejayuk.
ldougherty
Forum Contributor
Posts: 103
Joined: Sun May 03, 2009 11:39 am

Re: ftp_rename outputting warning command okay?.

Post by ldougherty »

That is a rather cryptic error. Does the process complete successfully and you're just seeing the warning or does it not work at all?

If it doesn't work I suggest outputting the values for $OldFilename and $NewFilename to see exactly what is happening.
Pejayuk
Forum Newbie
Posts: 2
Joined: Tue May 12, 2009 4:37 pm

Re: ftp_rename outputting warning command okay?.

Post by Pejayuk »

Everything goes through fine. The operation completes with no problems, however I still get the warning saying Command okay and the line number etc as posted above. :banghead:
Very strange.
Post Reply