php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73501 after upgrading from php 5.6.27 to php 5.6.28 ssh2 can no longer connect
Submitted: 2016-11-11 22:20 UTC Modified: 2016-11-13 16:14 UTC
From: mgoebel at emich dot edu Assigned:
Status: Duplicate Package: ssh2 (PECL)
PHP Version: 5.6.28 OS: SLES 11 SP4 x64
Private report: No CVE-ID: None
 [2016-11-11 22:20 UTC] mgoebel at emich dot edu
Description:
------------
after upgrading from php 5.6.27 to php 5.6.28 ssh2 can no longer connect

just seems to fail to open the stream?

Test script:
---------------
<?php
echo "<html><body>starting";

$strServer = "X.X.X.X";
$strServerPort = "22";
$strServerUsername = "grad_admissions_images";
$strServerPassword = "password";
$csv_filename = "test123.txt";

//connect to server
$resConnection = ssh2_connect($strServer, $strServerPort);

try {
$s = ssh2_auth_password($resConnection, $strServerUsername, $strServerPassword);
}
catch (Exception $e) { echo $e->message();}

if ($s == true) {
    //Initialize SFTP subsystem

    echo "connected";
    $resSFTP = ssh2_sftp($resConnection);    
    try {
    $resFile = fopen("ssh2.sftp://{$resSFTP}/".$csv_filename, 'w');
    var_dump($resFile);
    fwrite($resFile, "Testing");
    fclose($resFile);                   
    }
    catch (Exception $e) { echo $e->message();}
 
}else{
    echo "Unable to authenticate on server";
}

?>

<h2> all done</h2>
</body>
</html>



Actual result:
--------------
<html><body>startingconnected
Warning: fopen(ssh2.sftp://Resource id #5/test123.txt): failed to open stream: operation failed in /home/apache2/htdocs/tests/sftp_test.php on line 24


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-13 16:14 UTC] ab@php.net
-Status: Open +Status: Duplicate
 [2016-11-13 16:14 UTC] ab@php.net
See bug #73506.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 19:01:29 2024 UTC