php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17153 snmp_set_quick_print
Submitted: 2002-05-11 05:30 UTC Modified: 2002-08-08 01:00 UTC
Votes:7
Avg. Score:4.6 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:3 (42.9%)
Same OS:1 (14.3%)
From: jorgen at overload dot org Assigned:
Status: No Feedback Package: SNMP related
PHP Version: 4.2.0 OS: FreeBSD 4.5-p4
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-05-11 05:30 UTC] jorgen at overload dot 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?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-07 21:57 UTC] 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-08-08 01:00 UTC] php-bugs at lists dot php dot 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-08-20 18:27 UTC] vic at sheetz dot com
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.
 [2002-08-24 13:38 UTC] Tilli dot Falck at gmx dot de
I've experienced the same problem with Debian Linux on i386.
Versions are PHP 4.2.2, Apache 1.3.26 and UCD-SNMP 4.2.5
Downgrading to UCD-SNMP 4.2.3 fixes the issue.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Dec 01 11:04:49 2020 UTC