Page 1 of 1

ftp_rename outputting warning command okay?.

Posted: Tue May 12, 2009 4:43 pm
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.

Re: ftp_rename outputting warning command okay?.

Posted: Tue May 12, 2009 6:43 pm
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.

Re: ftp_rename outputting warning command okay?.

Posted: Sun May 17, 2009 9:39 am
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.