php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #27967 SNMP: need function to load additional MIBs
Submitted: 2004-04-12 17:40 UTC Modified: 2011-01-31 13:18 UTC
Votes:3
Avg. Score:2.7 ± 0.5
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mac dot and dot cheese at hush dot com Assigned: lytboris (profile)
Status: Not a bug Package: SNMP related
PHP Version: 4.3.4 OS: win32 only
Private report: No CVE-ID: None
 [2004-04-12 17:40 UTC] mac dot and dot cheese at hush dot com
Description:
------------
Working with Windows PHP 4.3.4 or 4.3.5 SNMP does not load all MIBS in c:/usr/mibs directory. php_snmp.dll compiled without HOST-RESOURCES_MIB.

Suggest adding additional MIBs to DEFAULT-MIB string in php_snmp.dll. 

I used a Hex Editor and modified the MIB String in the dll, adding HOST-RESOURCES.MIB;; (replacing SNMP-NOTIFICATION_MIB) and got desired results from snmprealwalk command.

Add additional MIBs matching those provided with PHP release.

Could not fine another reference to loading additional MIBs

NOTE: Unix (FreeBSD 4.9 - PHP 4.3.4) returns all of the text descriptors correctly. ucd-snmp 4.2.3 DEFAULT-MIBS (config.h) included HOST-RESOURCES-MIB and others...

Reproduce code:
---------------
snmprealwalk("127.0.0.1","public","");

snmpwalk or snmpwalkoid performs the same

Expected result:
----------------
host.hrSystem.hrSystemUptime.0  | Timeticks: (161078621) 18 days, 15:26:26.21 

Actual result:
--------------
25.1.1.0  | Timeticks: (161078621) 18 days, 15:26:26.21  


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-28 09:48 UTC] harrie@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Hi,

A default installation of NET-SNMP does not include
the HOST-RESOURCES-MIB in MIB modules read at start
up time. IIRC, due to this MIB module is not fully
supported on the Windows platform (for the agent side).

You need to have the HOST_RESOURCES-MIB, someone else
will need another MIB, and maybe some one will need a enterprise specific MIB module. It will become impossible
to fulfil all those requests and people depending on
other MIB modules better built the binary themselves.
(note, I do not built the binary version, so he may
choose differently)

Of course, an option is to add a configuration function
with which additional MIB modules can be loaded in PHP.

 [2010-12-01 16:17 UTC] jani@php.net
-Package: Feature/Change Request +Package: SNMP related
 [2011-01-31 13:18 UTC] lytboris@php.net
-Status: Analyzed +Status: Bogus -Assigned To: +Assigned To: lytboris
 [2011-01-31 13:18 UTC] lytboris@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 23:01:29 2024 UTC