|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-06-26 20:15 UTC] langemeijer@php.net
-Package: opcache
+Package: ssh2
[2017-06-26 21:24 UTC] mhagstrand at gmail dot com
[2017-06-27 14:43 UTC] andreas dot buchenrieder at check24 dot de
[2017-06-27 15:20 UTC] andreas dot buchenrieder at check24 dot de
[2021-02-10 16:13 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2021-02-10 16:13 UTC] cmb@php.net
[2021-02-21 04:22 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 02:00:01 2025 UTC |
Description: ------------ PHP-Version: 7.1.6-2+0~20170614060700.1+jessie~1.gbp831871 I open multiple ssh2 connections in a loop. In my case the server itself is always the same, but the username/password changes. So I cannot say if this error happens if the server changes as well Basically each file should be put on a different account With opcache enabled, every file is uploaded on the first connection, even though it should always be a new one. The streams meta data even shows a new resource id for each connection This does not happen in PHP 5.6 or with opcache disabled Test script: --------------- <?php $configs = [ ['host', 'username', 'password', '/path/'], // ... ]; while (true) { $index = array_rand($configs); list($host, $username, $password, $path) = $configs[$index]; $port = 22; $connection = ssh2_connect($host, 22); if ($connection === false) { continue; } if (!ssh2_auth_password($connection, $username, $password)) { continue; } $sftp = ssh2_sftp($connection); $handle = @fopen('ssh2.sftp://' . intval($sftp) . $path . $username, 'w+'); if ($handle === false) { continue; } print_r(stream_get_meta_data($handle)); fclose($handle); }