#39378 [Opn->Fbk]: Php page secure ftp change directory command fails

From: Date: Sat, 04 Nov 2006 15:56:40 +0000
Subject: #39378 [Opn->Fbk]: Php page secure ftp change directory command fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-104397@lists.php.net to get a copy of this message
ID: 39378 Updated by: pajoye@php.net Reported By: sanjib dot biswas at ieee dot org -Status: Open +Status: Feedback Bug Type: Directory function related Operating System: Windos XP PHP Version: 4.3.1.4 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip This php version does not exist. Please test using php 5.2.0 or 4.4.x. Previous Comments: ------------------------------------------------------------------------ [2006-11-04 15:43:30] sanjib dot biswas at ieee dot org I have corrected the PHP version we are using. ------------------------------------------------------------------------ [2006-11-04 15:30:00] sanjib dot biswas at ieee dot org Description: ------------ Although from the php page we are able to connect to a secure ftp server. But change directory (cd/chdir) command inside a php page to a secure ftp server always fails. Reproduce code: --------------- <?php // set up basic connection $conn_id = ftp_ssl_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // check connection if ((!$conn_id) || (!$login_result)) { die("FTP connection has failed !"); } echo "Current directory: " . ftp_pwd($conn_id) . "\n"; // try to change the directory to somedir if (ftp_chdir($conn_id, "somedir")) { echo "Current directory is now: " . ftp_pwd($conn_id) . "\n"; } else { echo "Couldn't change directory\n"; } // close the connection ftp_close($conn_id); ?> Expected result: ---------------- I should get: Current directory: \ Current directory is now: \somedir Actual result: -------------- I get: Current directory: \ Couldn't change directory ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39378&edit=1

« previous php.bugs (#104397) next »