ID: 39378
User updated by: sanjib dot biswas at ieee dot org
Reported By: sanjib dot biswas at ieee dot org
Status: Open
Bug Type: Directory function related
Operating System: Windos XP
-PHP Version: 4.4.4
+PHP Version: 4.3.1.4
New Comment:
I have corrected the PHP version we are using.
Previous Comments:
------------------------------------------------------------------------
[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