note 86168 added to function.rename

From: Date: Mon, 06 Oct 2008 17:36:50 +0000
Subject: note 86168 added to function.rename
Groups: php.notes 
Request: Send a blank email to php-notes+get-145097@lists.php.net to get a copy of this message
When I'm using unlink() or rename() with a SSH2.SFTP wrapper, both functions always return FALSE (but without a warning) even on success. Example: $connection = ssh2_connect(SERVER_NAME, PORT); ssh2_auth_password($connection, USERNAME, PASSWORD); $sftp = ssh2_sftp($connection); unlink("ssh2.sftp://$sftp/" . REMOTE_DIRECTORY . FILENAME); // returns FALSE on success and on failure rename("ssh2.sftp://$sftp/" . REMOTE_DIRECTORY . OLD_FILENAME, "ssh2.sftp://$sftp/" . REMOTE_DIRECTORY . NEW_FILENAME); // returns FALSE on success and on failure ---- Server IP: 82.160.94.10 Probable Submitter: 89.174.83.253 ---- Manual Page -- http://www.php.net/manual/en/function.rename.php Edit -- https://master.php.net/note/edit/86168 Del: integrated -- https://master.php.net/note/delete/86168/integrated Del: useless -- https://master.php.net/note/delete/86168/useless Del: bad code -- https://master.php.net/note/delete/86168/bad+code Del: spam -- https://master.php.net/note/delete/86168/spam Del: non-english -- https://master.php.net/note/delete/86168/non-english Del: in docs -- https://master.php.net/note/delete/86168/in+docs Del: other reasons-- https://master.php.net/note/delete/86168 Reject -- https://master.php.net/note/reject/86168 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#145097) next »