From:             karel_1980 at hotmail dot com
Operating system: Win XP SP1
PHP version:      4.3.5RC4
PHP Bug Type:     SNMP related
Bug description:  snmpget does not close the socket after query

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.

-- 
Edit bug report at http://bugs.php.net/?id=27661&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27661&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27661&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27661&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27661&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27661&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27661&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27661&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27661&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27661&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27661&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27661&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27661&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27661&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27661&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27661&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27661&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27661&r=float

Reply via email to