php.net |  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
Votes:2
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] pajoye@php.net
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.
 [2006-11-04 16:15 UTC] sanjib dot biswas at ieee dot org
n/a
 [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: Thu Apr 18 22:01:28 2024 UTC