#23685 [Fbk->Csd]: fake values returned when OID value is an empty string
| From: | s dot zagrodzki at net dot icm dot edu dot pl | Date: | Fri, 18 Jul 2003 09:24:30 +0000 |
| Subject: | #23685 [Fbk->Csd]: fake values returned when OID value is an empty string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-44241@lists.php.net to get a copy of this message | ||
ID: 23685
User updated by: s dot zagrodzki at net dot icm dot edu dot pl
Reported By: s dot zagrodzki at net dot icm dot edu dot pl
-Status: Feedback
+Status: Closed
Bug Type: SNMP related
Operating System: Linux 2.2
PHP Version: 4.3.2RC4-dev
New Comment:
oh yes. With php4-STABLE-200307180730 the problem is gone.
Previous Comments:
------------------------------------------------------------------------
[2003-07-16 03:58:24] sniper@php.net
I said:
"Make sure the snapshot is build _later_ than Jul 16, 2003 05:30!!"
------------------------------------------------------------------------
[2003-07-16 02:53:43] s dot zagrodzki at net dot icm dot edu dot pl
tried 20030716-0530 version, didn't help.
I did some more tests:
when I tried snmpwalk()ing ".1.3.6.1.4.1.9.2.2.1.1.28" tree (which is
the same as ifAlias, but resides in enterprises.*)
the results were correct. Even more, they had double-quotes
on both sides of the string. tcpdump showed that all responses are
exactly the same - same length and value, but PHP displayed them in
another way. My guess was that snmpwalk has problems when it _knows_
that the type of received OID value is DisplayString. Then it doesn't
put quotes with value.
Simple test - I removed ifAlias definition from IF-MIB.txt
and voila - snmpwalk() returns correct values, but with quotes.
It seems like php-snmp has problem with empty values (and when OID type
is unknown, the result is not an empty value, but string consisting of
two quotes.
------------------------------------------------------------------------
[2003-07-16 01:05:19] 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
Make sure the snapshot is build later than Jul 16, 2003 05:30!!
------------------------------------------------------------------------
[2003-07-14 15:15:23] harrie@php.net
Attempted in various ways, but I cannot reproduce this.
Maybe it is a Linux problem, since I do PHP development
on a CYGWIN system.
Neither do I get the same results as the 'user
contributed note' on snmpget.
------------------------------------------------------------------------
[2003-07-14 09:44:57] s dot zagrodzki at net dot icm dot edu dot pl
this issue was also mentioned by javierb at gmx dot net in user
contributed notes to snmpget() function manual:
http://www.php.net/manual/en/function.snmpget.php
------------------------------------------------------------------------
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/23685
--
Edit this bug report at http://bugs.php.net/?id=23685&edit=1