php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7713 snmp functions not returning any data
Submitted: 2000-11-09 04:35 UTC Modified: 2001-04-02 10:18 UTC
From: j dot f dot howlett at bris dot ac dot uk Assigned:
Status: Closed Package: SNMP related
PHP Version: 4.0.3pl1 OS: Linux RH7.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: j dot f dot howlett at bris dot ac dot uk
New email:
PHP Version: OS:

 

 [2000-11-09 04:35 UTC] j dot f dot howlett at bris dot ac dot uk
Linux RH7.0
Apache
PHP 4.0.3pl1
ucd-snmp 4.1.2

ucd-snmp compiled both with and without config.h hack.

php compiled with --with-apxs --with-pgsql --with-snmp AND WITH AND WITHOUT --enable-ucd-snmp-hack

No compile or runtime errors.

None of the snmp related functions return any data:

eg.

$mibs=snmpwalk("xxx.xxx.xxx.xxx","community","");
echo count($mibs);

returns "0".

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-04 12:28 UTC] j dot f dot howlett at bris dot ac dot uk
when restarting apache:

PHP Warning: Unable to load dynamic library './snmp.so' - ./snmp.so: cannot open shared object file: No such file or directory in Unknown on line 0.

hope that helps!




 [2000-12-04 12:30 UTC] sniper@php.net
Where is the snmp.so located in your system?
Is the path of it in /etc/ld.so.conf ??
If not, add it and run ldconfig.

--Jani
 [2000-12-05 13:38 UTC] j dot f dot howlett at bris dot ac dot uk
For some reason, php stopped compiling altogether --with-snmp.  (perhaps due to attempting compile with most recent version of ucd-snmp?).  So......

Followed previous instructions, plus I recompiled ucd-snmp with --enable-shared

After this, php compiled fine with: --with-apxs --with-pgsql --with-snmp.

The extension_dir was not looking in the right place for snmp.so, so I set extension_dir in php.ini to "/usr/share/snmp" (location of snmp.so).

However, on restarting Apache, error in /var/log/httpd/error.log:

PHP Warning: Unable to load dynamic library '/usr/share/snmp.so' - /usr/share/snmp/snmp.so: cannot open shared object file: No such file or directory in Unknown on line 0.
[Repeated again]


Thanks...

 [2000-12-05 13:48 UTC] j dot f dot howlett at bris dot ac dot uk
Ooops, getting tired.....: libsnmp.so is in /usr/local/lib as you'd expect.  Changed extension_dir back to /usr/local/lib, but same problem:

 "/usr/local/lib/snmp.so: cannot open shared object file: no such file or directory in Unknown on line 0'.




 [2000-12-05 18:37 UTC] sniper@php.net
You haven't compiled snmp as shared extension for PHP.
Put a ; in front of  the extension=snmp.so in php.ini.
Check that you have /usr/local/lib in /etc/ld.so.conf (if it isn't add it and run ldconfig).

Then try to start apache again. 

--Jani
 [2001-01-12 10:34 UTC] sniper@php.net
No feedback --> closed. (considered problem solved)

--Jani
 [2001-04-02 10:18 UTC] j dot f dot howlett at bris dot ac dot uk
Sorry, didn't get to you - this indeed fixed this (particular!) problem.

Thanks for your assistance.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 11 21:01:27 2024 UTC