Bug #64169 [Com]: opendir not working with sftp since upgrade from php 5.3.14 to 5.3.21
| From: | bluej100 at gmail dot com | Date: | Sat, 18 May 2013 16:44:45 +0000 |
| Subject: | Bug #64169 [Com]: opendir not working with sftp since upgrade from php 5.3.14 to 5.3.21 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-179006@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64169&edit=1
ID: 64169
Comment by: bluej100 at gmail dot com
Reported by: michael dot dalbosco at gmail dot com
Summary: opendir not working with sftp since upgrade from php
5.3.14 to 5.3.21
Status: Open
Type: Bug
Package: Directory function related
Operating System: Debian 4.4.5-8
PHP Version: 5.3.21
Block user comment: N
Private report: N
New Comment:
To clarify, this issue specifically affects the root directory, if Michael and I are seeing the same
thing. Subdirectory listing works fine.
Previous Comments:
------------------------------------------------------------------------
[2013-05-07 23:48:34] bluej100 at gmail dot com
I've done a build of 5.6.0-dev head with ssh2 0.12 and confirmed that this bug is still
present.
------------------------------------------------------------------------
[2013-05-07 18:25:45] bluej100 at gmail dot com
This ticket may belong under PECL->SSH2 rather than directory functions.
------------------------------------------------------------------------
[2013-05-07 18:23:36] bluej100 at gmail dot com
This is discussed at http://stackoverflow.com/a/16238476/69173,
which notes that you can work around the issue by appending an explicit current-directory period.
I'm willing to try to create a patch for this. It'll be a little tough to write a test
case for it, though--should I include a reference to a public sftp share?
------------------------------------------------------------------------
[2013-02-07 11:17:17] michael dot dalbosco at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.opendir#refsect1-function.opendir-description
---
I'm connecting to a Sftp server and try to open a directory on this server. It worked fine on
php 5.3.10 and php 5.3.14 but since we upgraded to 5.3.21 it doesn't work anymore, opendir
returns false.
Test script:
---------------
$con = ssh2_connect($server, $port);
ssh2_auth_pubkey_file ( $con, $login, $pubKeyFile, $privKeyFile);
$sftp = ssh2_sftp($con);
$dir = "ssh2.sftp://$sftp/";
var_dump(opendir($dir));
Expected result:
----------------
the directory resource
Actual result:
--------------
false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64169&edit=1