php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27661 snmpget does not close the socket after query
Submitted: 2004-03-23 15:06 UTC Modified: 2004-04-01 11:55 UTC
Votes:6
Avg. Score:4.8 ± 0.4
Reproduced:6 of 6 (100.0%)
Same Version:1 (16.7%)
Same OS:2 (33.3%)
From: karel_1980 at hotmail dot com Assigned: iliaa (profile)
Status: No Feedback Package: SNMP related
PHP Version: 4.3.5RC4 OS: Win XP SP1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
36 + 20 = ?
Subscribe to this entry?

 
 [2004-03-23 15:06 UTC] karel_1980 at hotmail dot com
Description:
------------
using snmpget(...) multiple times to monitor a snmp device will cause an error:
Warning: snmpget(): Could not open snmp connection: Invalid local port in D:\Server\WWW\php\snmp\background2.php on line 20

This happens on php version 4.3.4 and 4.3.5RC2

This is propably because the snmpget doensnt close the socket after using and does not reuse it.


Reproduce code:
---------------
while(TRUE){
snmpget("192.168.1.1", "public", ".1.3.6.1.2.1.2.2.1.16.2"), " ");
}

Expected result:
----------------
simply run endlessly.

Actual result:
--------------
Wil give an error after using all sockets.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-26 14:02 UTC] iliaa@php.net
Please try latest CVS. There was a leak in PHP 5.0 that was 
fixed, but I do not see that problem in PHP4 sources. 
 [2004-04-01 11:55 UTC] iliaa@php.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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 08:01:27 2024 UTC