Bug #3407: Invalid object identifier
| From: | deicher at sandia dot gov | Date: | Fri, 04 Feb 2000 19:46:27 +0000 |
| Subject: | Bug #3407: Invalid object identifier | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15204@lists.php.net to get a copy of this message | ||
From: deicher@sandia.gov
Operating system: OpenBSD 2.6 -currrent
PHP version: 3.0.14
PHP Bug Type: Misbehaving function
Bug description: Invalid object identifier
Using the snmpget function this will fail immediately with Invalid object
identifier and nothing goes out the wire, BUT if you use the snmpwalk function
the same error occurs but there is actually an snmpget function seen on the
wire. (See net capture at end of entry, this is only a subset of the capture)
PHP SCRIPT--------------------------------------------------------------------------
<?PHP
/*
** Print SNMP Query
*/
debugger_on( "127.0.0.1");
$snmpdata = snmpwalk( "$hostname", "$read-string", "$oid");
for($x = 0; $x < count($snmpdata); $x++)
{
echo $snmpdata[$x]. "\n";
}
?>
PHP CONFIGURE LINE---------------------------------------------------------------
Configure command: ./configure '--with-apxs=/usr/sbin/apxs' '--with-pcre-regex'
'--with-config-file-path=/var/www/conf'
'--with-gd=/usr/local' '--with-gdbm' '--with-pgsql'
'--with-snmp=' '--with-zlib=/usr' '--with-ftp'
'--with-gettext=/usr/local'
'--with-imagick=/usr/X11R6' '--with-xml' '--enable-track-vars'
'--enable-magic-quotes' '--enable-debugger' '--prefix=/usr/local'
'--sysconfdir=/etc'
PHPDEBUG LOG ENTRY -------------------------------------------------------------
2000-02-04 12:26:807950 sagw4399(28242) start: warning
2000-02-04 12:26:807950 sagw4399(28242) message: Invalid object identifier: .1.3.6.1.2.1.2.2.1.2
2000-02-04 12:26:807950 sagw4399(28242) location: /var/www/htdocs/https/napps/snmp_display.php3:18
2000-02-04 12:26:807950 sagw4399(28242) frames: 1
2000-02-04 12:26:807950 sagw4399(28242) function: snmpwalk
2000-02-04 12:26:807950 sagw4399(28242) location: /var/www/htdocs/https/napps/snmp_display.php3:18
2000-02-04 12:26:807950 sagw4399(28242) end: warning
2000-02-04 12:26:876288 sagw4399(28242) start: warning
2000-02-04 12:26:876288 sagw4399(28242) message: No Response from sals001
NETWORK CAPTURE BELOW--------------------------------------------------------
sagw4399# snmptranslate .iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifDescr
.1.3.6.1.2.1.2.2.1.2
sagw4399# apachectl restart
/usr/sbin/apachectl restart: httpd restarted
sagw4399# /usr/local/src/ethereal/tethereal -V -f "host uuxxyyy and udp port 161"
Capturing on xl0
Frame 1 (91 on wire, 91 captured)
Arrival Time: Feb 4, 2000 12:26:07.8204
Time delta from previous packet: 0.000000 seconds
Frame Number: 1
Packet Length: 91 bytes
Capture Length: 91 bytes
Ethernet II
Destination: 00:90:92:ff:44:00 (00:90:92:ff:44:00)
Source: 00:10:4b:cb:15:be (3Com_cb:15:be)
Type: IP (0x0800)
Internet Protocol
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default)
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..00 = Currently Unused: 0
Total Length: 77
Identification: 0xa8ef
Flags: 0x00
.0.. = Don't fragment: Not set
..0. = More fragments: Not set
Fragment offset: 0
Time to live: 64
Protocol: UDP (0x11)
Header checksum: 0x0c0a (correct)
Source: aabbcccc.blahblah.org (xxx.yyy.zzz.227)
Destination: uuxxyyy.blahblah.org (xxx.yyy.zzz.201)
User Datagram Protocol
Source port: 31331 (31331)
Destination port: snmp (161)
Length: 57
Checksum: 0x5da7
Simple Network Management Protocol
Version: 1
Community: -string
PDU type: GET-NEXT
Request Id: 0x6f5228dd
Error Status: NO ERROR
Error Index: 0
Object identifier 1: 1.3.6.1.2.1 (.iso.org.dod.internet.mgmt.mib-2)
Value: NULL