Edit report at http://bugs.php.net/bug.php?id=38516&edit=1

 ID:                 38516
 Comment by:         ch at lathspell dot de
 Reported by:        larryjadams at comcast dot net
 Summary:            functions snmpgetnext and snmp2_getnext do not work
 Status:             Open
 Type:               Feature/Change Request
 Package:            SNMP related
 Operating System:   Win32
 PHP Version:        5.1.5
 Block user comment: N
 Private report:     N

 New Comment:

At least it works as supposed on Linux with Net-SNMP and PHP-5.3.6...



 $ php -r 'print_r(snmpwalkoid("localhost", "public", ""));' | head

 Array

 ( 

    [SNMPv2-MIB::sysDescr.0] => STRING: Linux james 2.6.37-2-amd64 #1
SMP Sun  Feb 27 10:12:22 UTC 2011 x86_64

     [SNMPv2-MIB::sysObjectID.0] => OID:
NET-SNMP-MIB::netSnmpAgentOIDs.10

     ...


Previous Comments:
------------------------------------------------------------------------
[2006-08-23 17:33:07] larryjadams at comcast dot net

Sorry Tony, the OID should be optional in this call.  If it is found to
be blank, the function should behave like net-snmp's getnext when it is
called without an OID, which is to return the first OID from the entire
tree, typically sysDescr.



Today it is not optional and fails when left to a blank string.

------------------------------------------------------------------------
[2006-08-23 17:05:27] tony2...@php.net

What fix are you talking about?

Please explain first what do you think is wrong and how to reproduce it.

------------------------------------------------------------------------
[2006-08-23 15:39:28] larryjadams at comcast dot net

Tony,



How bout I send you a fix.  I can do that much np.  I could also send
you the fix to build net-snmp for windows rather than ucd-snmp if you
like.

------------------------------------------------------------------------
[2006-08-23 15:18:01] larryjadams at comcast dot net

You are right, daddy needs a new pair of glasses.  However, if you set
the OID string to "", it still fails, while, if you run the following
command from the command line it will still work:



snmpgetnext -c public -v 1 localhost



The php_snmp requires the OID to be something other than a blank string.

------------------------------------------------------------------------
[2006-08-23 12:27:42] metaur at telia dot com

Wrong community string? (One of your examples say "public" and the other
says "pubilc".)



// Ulf Härnhammar

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=38516


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=38516&edit=1

Reply via email to