|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-11-13 16:14 UTC] ab@php.net
-Status: Open
+Status: Duplicate
[2016-11-13 16:14 UTC] ab@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 15:00:01 2025 UTC |
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