#22529 [Fbk->Opn]: snmpset is not working

From: Date: Wed, 05 Mar 2003 06:21:50 +0000
Subject: #22529 [Fbk->Opn]: snmpset is not working
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-34845@lists.php.net to get a copy of this message
ID: 22529 User updated by: mb at solstaden dot net Reported By: mb at solstaden dot net -Status: Feedback +Status: Open Bug Type: SNMP related Operating System: FreeBSD 4.8 Prerelease PHP Version: 4CVS-2003-03-04 (stable) New Comment: I did upgrade! Sorry to say, same error. I tried with system.sysContact.0 and sysCobtact.0 Warning: snmpset() [function.snmpset]: Invalid object identifier: system.sysContact.0 in /usr/local/www/data/snmp.php on line 27 Warning: snmpset() [function.snmpset]: Error in packet: (noSuchName) There is no such variable name in this MIB. in /usr/local/www/data/snmp.php on line 27 Warning: snmpset() [function.snmpset]: This name does not exist: SNMPv2-SMI::mib-2 in /usr/local/www/data/snmp.php on line 27 Magnus Previous Comments: ------------------------------------------------------------------------ [2003-03-04 19:23:43] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-03-04 04:12:55] mb at solstaden dot net Hi! I found out that, instead of typing in the OID as a string, system.sysContact.0, u type it as numeric, .1.3.6.1.2.1.1.4.0 then it snmpset works. Does not help me much but maybe some smarter person. /Magnus ------------------------------------------------------------------------ [2003-03-04 00:22:34] mb at solstaden dot net I tried a verey simple php script: echo snmpget( "81.26.237.10", "public", "system.sysContact.0" ); snmpset( "81.26.237.10", "private", "system.sysContact.0", "s", "kalle" ); snmpget works: snmpset fails: ouput as follows: STRING: mb@solstaden.net Warning: snmpset() [function.snmpset]: Invalid object identifier: system.sysContact.0 in /usr/local/www/data/snmp.php on line 17 Warning: snmpset() [function.snmpset]: Error in packet: (noSuchName) There is no such variable name in this MIB. in /usr/local/www/data/snmp.php on line 17 Warning: snmpset() [function.snmpset]: This name does not exist: SNMPv2-SMI::mib-2 in /usr/local/www/data/snmp.php on line 17 I did a tcpdump: 07:04:22.160998 gk.s.port80.se.1556 > as1-1-1--11.eklandahage4.molndal.bostream.net.snmp: GetRequest(28) system.sysDescr.0 07:04:22.179314 as1-1-1--11.eklandahage4.molndal.bostream.net.snmp > gk.s.port80.se.1556: GetResponse(39) system.sysDescr.0="Ericsson DR" 07:04:22.180077 gk.s.port80.se.1557 > as1-1-1--11.eklandahage4.molndal.bostream.net.snmp: GetRequest(28) system.sysContact.0 07:04:22.194298 as1-1-1--11.eklandahage4.molndal.bostream.net.snmp > gk.s.port80.se.1557: GetResponse(39) system.sysContact.0="mb@solstade" 07:04:22.194991 gk.s.port80.se.1558 > as1-1-1--11.eklandahage4.molndal.bostream.net.snmp: C=private SetRequest(30) ="kalle" 07:04:22.209407 as1-1-1--11.eklandahage4.molndal.bostream.net.snmp > gk.s.port80.se.1558: C=private GetResponse(30) noSuchName@1 ="kalle" Am I doing anything wrong? Normally it is my fault. If u think I have found a bug, I will do my best to help u. Magnus Benngard ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22529&edit=1

« previous php.bugs (#34845) next »