php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25636 SNMP Session not closed
Submitted: 2003-09-23 11:58 UTC Modified: 2003-09-23 14:24 UTC
From: nesslage at mwsc dot edu Assigned:
Status: Closed Package: SNMP related
PHP Version: 4.3.3 OS: RH Linux 7.3
Private report: No CVE-ID: None
 [2003-09-23 11:58 UTC] nesslage at mwsc dot edu
Description:
------------
In ext/snmp/snmp.c, it is possible to exit php_snmp_internal without closing the snmp session when performing an snmpget. This leads to 'too many open files' errors on a script with many snmpget requests.


Reproduce code:
---------------
ext/snmp/snmp.c: Lines 427 to 430

                    if (st == 1) {
                        *return_value = *snmpval;
                        zval_copy_ctor(return_value);
                        return;

should be changed to:

                    if (st == 1) {
                        *return_value = *snmpval;
                        zval_copy_ctor(return_value);
                        snmp_close(ss);
                        return;


Expected result:
----------------
No more 'too many open files' errors.


Actual result:
--------------
No more 'too many open files' errors.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-23 14:24 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC