#17153 [Com]: snmp_set_quick_print
| From: | vic at sheetz dot com | Date: | Tue, 20 Aug 2002 22:27:59 +0000 |
| Subject: | #17153 [Com]: snmp_set_quick_print | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-17359@lists.php.net to get a copy of this message | ||
ID: 17153
Comment by: vic@sheetz.com
Reported By: jorgen@overload.org
Status: No Feedback
Bug Type: SNMP related
Operating System: FreeBSD 4.5-p4
PHP Version: 4.2.0
New Comment:
I am having the same issue. I built php 4.2.2 under Solaris 8, using
ucd snmp 4.2.5.
The problem is that the default for the snmp functions is to return
values that contain the oid value, an equals sign, sometimes a type,
and then the value. (Not very useful IMO.)
The documentation for snmp_set_quick_print() implies that it can be
used to suppress the oid and other junk, but it only suppresses the
equals sign and the type. The oid is still included.
For example:
snmp_set_quick_print(0);
echo snmpget("3600.sheetz.com", "public", "system.sysDescr.0");
prints:
system.sysDescr.0 = Cisco Internetwork Operating System Software IOS
(tm) 3600 Software (C3640-JO3S56I-M), Version 12.1(1.5)T, MAINTENANCE
INTERIM SOFTWARE Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Mon 24-Apr-00 14:58 by phanguye
and
snmp_set_quick_print(1);
echo snmpget("3600.sheetz.com", "public", "system.sysDescr.0");
returns this:
system.sysDescr.0 Cisco Internetwork Operating System Software IOS (tm)
3600 Software (C3640-JO3S56I-M), Version 12.1(1.5)T, MAINTENANCE
INTERIM SOFTWARE Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Mon 24-Apr-00 14:58 by phanguye
It's the same thing without the equals sign.
It should return:
Cisco Internetwork Operating System Software IOS (tm) 3600 Software
(C3640-JO3S56I-M), Version 12.1(1.5)T, MAINTENANCE INTERIM SOFTWARE
Copyright (c) 1986-2000 by cisco Systems, Inc. Compiled Mon 24-Apr-00
14:58 by phanguye
After looking at the PHP source code (snmp.c), it looks like PHP does
nothing with the parameter passed to the snmp_set_quick_print function.
It's just passed to the snmp library. I assume that this means the
problem is probably in the library and not in php.
I don't have a lot of time to investigate so I could be totally wrong.
Previous Comments:
------------------------------------------------------------------------
[2002-08-08 01:00:15] php-bugs@lists.php.net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2002-07-07 21:57:38] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2002-05-11 05:30:21] jorgen@overload.org
According to the documentation the snmp_set_quick_print()
function when set to true should make it possible for snmpget() to get
returned only the snmp oid values, thus without the snmp oid itself.
This suddenly stopped working when i upgraded to php4.2
Could anyone look into this one?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17153&edit=1