Bug #73561 [Opn->Dup]: opendir() using a ssh2.sftp:// resource does not work

From: Date: Fri, 18 Nov 2016 10:40:52 +0000
Subject: Bug #73561 [Opn->Dup]: opendir() using a ssh2.sftp:// resource does not work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-205448@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73561&edit=1

 ID:                 73561
 Updated by:         requinix@php.net
 Reported by:        sascha dot pfalz at ivz dot de
 Summary:            opendir() using a ssh2.sftp:// resource does not
                     work
-Status:             Open
+Status:             Duplicate
 Type:               Bug
 Package:            Directory function related
 Operating System:   Red Hat Linux 7.2
 PHP Version:        7.0.13
 Block user comment: N
 Private report:     N

 New Comment:

Another duplicate of bug #73506


Previous Comments:
------------------------------------------------------------------------
[2016-11-18 10:10:08] sascha dot pfalz at ivz dot de

Description:
------------
I'm using the ssh2 Extension (1.0) together with PHP 7 to work on SSH enabled servers.
When trying to read a directory on the SSH2 via the ssh2.sftp:// wrapper,
I've got the following error under 7.0.13:

PHP Warning:  opendir(ssh2.sftp://Resource id #49/test): failed to open
dir: operation failed

Using exactly the same code with the same ssh2 extension under PHP 7.0.12 everything works as
expected.




Test script:
---------------
$dirname  = sprintf("ssh2.sftp://%s%s",$this->SFTP,"/test");
$handle   = opendir($dirname);




Expected result:
----------------
Getting a directory handle ready to traverse the entries with readdir().

Actual result:
--------------
$handle is boolean(false) instead of directory handle, and this warning is printed:

PHP Warning:  opendir(ssh2.sftp://Resource id #7/ivz-export/test/):
failed to open dir: operation failed in ivz_sftp2.class.php on line 98



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=73561&edit=1


Thread (3 messages)

« previous php.bugs (#205448) next »