|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39378 Php page secure ftp change directory command fails
Submitted: 2006-11-04 15:30 UTC Modified: 2006-11-15 01:00 UTC
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: sanjib dot biswas at ieee dot org Assigned:
Status: No Feedback Package: Directory function related
PHP Version: 4.4.4 OS: Windos XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: sanjib dot biswas at ieee dot org
New email:
PHP Version: OS:


 [2006-11-04 15:30 UTC] sanjib dot biswas at ieee dot org
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:

// 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

Expected result:
I should get:
Current directory: \
Current directory is now: \somedir

Actual result:
I get:
Current directory: \
Couldn't change directory


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-04 15:43 UTC] sanjib dot biswas at ieee dot org
I have corrected the PHP version we are using.
 [2006-11-04 15:56 UTC]
Please try using this CVS snapshot:
For Windows:

This php version does not exist.

Please test using php 5.2.0 or 4.4.x.
 [2006-11-04 16:15 UTC] sanjib dot biswas at ieee dot org
 [2006-11-15 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 21:01:28 2024 UTC