|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24760 Setting SNMP port fails to actually change anything
Submitted: 2003-07-22 19:05 UTC Modified: 2003-07-25 07:45 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: chuck+php at 2003 dot snew dot com Assigned:
Status: Closed Package: SNMP related
PHP Version: 4.3.3RC1 OS: FreeBSD (4 & 5)
Private report: No CVE-ID:
 [2003-07-22 19:05 UTC] chuck+php at 2003 dot snew dot com
snmpget ("myhost:10161", $community, $OID);

ends up putting out packets to port, er, 161, not 10161.

verified with tcpdump.

Putting printfs in ext/snmp/snmp.c shows that
the port is being parsed right, but the packets still
go out wrong.

Compiled against net-snmp-5.0.8 (current version of netsnmp) 

A nice bonus would be to allow TCP to be used (5.0.8 allows this
just fine).

Reproduce code:
$sysLoc = snmpwalk("host03.mydomain:10161", "public", "sysLocation.0", 20);

tcpdump will show it going out 161

Expected result:
It *should* use port 10161 and talk to agent there.

Actual result:
Warning: snmpget(): No response from host03.$mydomain in
    /var/www/docs/foo.php on line 2

# agent is not listening on port 161


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-25 07:45 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Sun Nov 29 14:01:30 2015 UTC