Bug #73561 [NEW]: opendir() using a ssh2.sftp:// resource does not work
From: sascha dot pfalz at ivz dot de
Operating system: Red Hat Linux 7.2
PHP version: 7.0.13
Package: Directory function related
Bug Type: Bug
Bug description:opendir() using a ssh2.sftp:// resource does not work
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 bug report at https://bugs.php.net/bug.php?id=73561&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73561&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73561&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73561&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73561&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73561&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73561&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73561&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73561&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73561&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73561&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73561&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73561&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73561&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73561&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73561&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73561&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73561&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73561&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73561&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73561&r=mysqlcfg
Thread (3 messages)
- sascha dot pfalz at ivz dot de