php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57764 channels are not getting closed
Submitted: 2007-07-31 10:55 UTC Modified: 2013-02-18 00:35 UTC
From: berdir@php.net Assigned:
Status: No Feedback Package: ssh2 (PECL)
PHP Version: 5.2.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: berdir@php.net
New email:
PHP Version: OS:

 

 [2007-07-31 10:55 UTC] berdir@php.net
Description:
------------
It seems, that the command ssh2_exec (and others) does open a new channel, every time it is called, but these channels are not getting closed. If I want to send more commands than open channels are allowed, i am getting the following error on the server side:

Jul 25 12:43:06 sles10vm sshd[19087]: error: no more sessions

These channels should be closed automatically (fclose($stream) ?) or there should be functions to close them (ssh2_close($stream) for example).



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-10 07:11 UTC] noels01 at gmx dot net
Hi,
same problem here. I stumbled upon this bug when switching from HP-UX to a Linux system. The relevant setting for the OpenSSH daemon seems to be
session.c:#define MAX_SESSIONS 10
Thus only 10 ssh2_exec's are possible and then it fails. This shouldn't be a problem if it would be possible to close open sessions or if they were closed automatically.
 [2008-04-30 06:25 UTC] volkirik-wants-nospam at yahoo dot com dot tr
we experience same here, this problem should be solved,

there should be a way to close channels
 [2008-05-09 12:54 UTC] volkirik at yahoo dot com dot tr
fclose is supported for ssh2_exec streams...

It'll close that stream, but the connection remains open...

To close SSH2 connection: you have to close all child streams with fclose($stream) then unset the connection context

----
Volkan K.
 [2012-06-14 22:07 UTC] langemeijer@php.net
Is this still an issue? I think it might have been solved in an previous release.
 [2012-06-14 22:07 UTC] langemeijer@php.net
-Status: Open +Status: Feedback
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Mar 02 15:01:24 2021 UTC