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: 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? Previous Comments: ------------------------------------------------------------------------ [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