Bug #73861 [NEW]: SNMP works only for port 161

From: Date: Wed, 04 Jan 2017 16:20:21 +0000
Subject: Bug #73861 [NEW]: SNMP works only for port 161
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206299@lists.php.net to get a copy of this message
From: layer1 dot 0 at gmx dot de Operating system: Ubuntu 16.04 PHP version: 7.1.0 Package: SNMP related Bug Type: Bug Bug description:SNMP works only for port 161 Description: ------------ Hi, i try to fetch SNMP Data from JVM running SNMP Adaptor on Port 1161. It's not working via php cause the SNMP Class and SNMP functions always seem to use port 161. snmpwalk on OS level with port 1161 (same data) is working fine! i tried: $syscontact = snmpget($host, "127.0.0.1:1161", ".1"); var_dump($syscontact); It retruns false $session = new SNMP( SNMP::VERSION_2C, "127.0.0.1:1161" , "public" ); var_dump($session); object(SNMP)#1 (8) { ["info"]=> array(4) { ["hostname"]=> string(14) "127.0.0.1:1161" ["port"]=> int(1161) ["timeout"]=> int(-1) ["retries"]=> int(-1) } ["max_oids"]=> NULL ["valueretrieval"]=> int(0) ["quick_print"]=> bool(false) ["enum_print"]=> bool(false) ["oid_output_format"]=> int(0) ["oid_increasing_check"]=> bool(true) ["exceptions_enabled"]=> int(0) } Here i would expect hostname = 127.0.0.1 but it is hostname + port. Maybe this is not working correctly. -- Edit bug report at https://bugs.php.net/bug.php?id=73861&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73861&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73861&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73861&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73861&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73861&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73861&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73861&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73861&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73861&r=support Expected behavior: https://bugs.php.net/fix.php?id=73861&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73861&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73861&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73861&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73861&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73861&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73861&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73861&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73861&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73861&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73861&r=mysqlcfg

« previous php.bugs (#206299) next »