|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73861 SNMP works only for port 161
Submitted: 2017-01-04 16:20 UTC Modified: 2017-01-04 18:26 UTC
From: layer1 dot 0 at gmx dot de Assigned:
Status: Closed Package: SNMP related
PHP Version: 7.1.0 OS: Ubuntu 16.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: layer1 dot 0 at gmx dot de
New email:
PHP Version: OS:


 [2017-01-04 16:20 UTC] layer1 dot 0 at gmx dot de
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, "", ".1");
It retruns false 

$session = new SNMP( SNMP::VERSION_2C, "" , "public" );

object(SNMP)#1 (8) { ["info"]=> array(4) { ["hostname"]=> string(14) "" ["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 = but it is hostname + port. Maybe this is not working correctly.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-04 16:23 UTC] layer1 dot 0 at gmx dot de
sorry for c&p error 

i tried: 
$syscontact = snmpget("", "public", ".1");
Returns false
 [2017-01-04 18:26 UTC] layer1 dot 0 at gmx dot de
-Status: Open +Status: Closed
 [2017-01-04 18:26 UTC] layer1 dot 0 at gmx dot de
Works now, but the display is missleading
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 27 23:03:36 2021 UTC