php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8919 MIBS aren't recognized
Submitted: 2001-01-25 18:18 UTC Modified: 2001-01-26 16:27 UTC
From: keh at au dot ac dot th Assigned:
Status: Closed Package: SNMP related
PHP Version: 4.0.4pl1 OS: Solaris 8
Private report: No CVE-ID: None
 [2001-01-25 18:18 UTC] keh at au dot ac dot th
I compiled PHP with UCD-SNMP 4.2. using --with-snmp=DIR
and --enable-ucd-snmp-hack. The other modules compiled
in are openssl, gdbm, db3, imapssl, imap, ldap, and
internal mysql. PHP is compiled as apache DSO.

When I start apache (using apachectl startssl),
apache log files shows:

Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI-V1SMI): At line 0 in (none)
Cannot find module (CISCO-SMI-V1SMI): At line 0 in (none)
Cannot find module (OLD-CISCO-INTERFACES-MIB): At line 0 in (none)
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)

I tried again by setting environment variable
MIBDIRS but no effect. I try modifying the ext/snmp.c
by replacing init_mib() with init_snmp("phpsnmp") and
the error goes away.

However, in both cases (init_mib and init_snmp), when
I execute snmpget() in php source file.. I get

Warning: Invalid object identifier: system.sysContact.0
in <my source php file> on line <line number>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-26 16:27 UTC] keh at au dot ac dot th
I remove the call to init_mib() from
PHP_MINIT_FUNCTION(snmp) function and
add a call to init_snmp("phpsnmp") in
php_snmp() function. It works now..
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 23:01:25 2019 UTC