Bug #73861 [Opn]: SNMP works only for port 161
| From: | layer1 dot 0 at gmx dot de | Date: | Wed, 04 Jan 2017 16:23:31 +0000 |
| Subject: | Bug #73861 [Opn]: SNMP works only for port 161 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206300@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73861&edit=1
ID: 73861
User updated by: layer1 dot 0 at gmx dot de
Reported by: layer1 dot 0 at gmx dot de
Summary: SNMP works only for port 161
Status: Open
Type: Bug
Package: SNMP related
Operating System: Ubuntu 16.04
PHP Version: 7.1.0
Block user comment: N
Private report: N
New Comment:
sorry for c&p error
i tried:
$syscontact = snmpget("127.0.0.1:1161", "public", ".1");
var_dump($syscontact);
Returns false
Previous Comments:
------------------------------------------------------------------------
[2017-01-04 16:20:19] layer1 dot 0 at gmx dot de
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 this bug report at https://bugs.php.net/bug.php?id=73861&edit=1