php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34447 TRoubles with the net-snmp API
Submitted: 2005-09-09 20:36 UTC Modified: 2005-09-18 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: p dot burkhalter at gmx dot net Assigned:
Status: No Feedback Package: SNMP related
PHP Version: 5.1.0RC1 OS: SunOS 5.8
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: p dot burkhalter at gmx dot net
New email:
PHP Version: OS:

 

 [2005-09-09 20:36 UTC] p dot burkhalter at gmx dot net
Description:
------------
While executing a simple php-script started by apache, the php function:
snmpget(string hostname, string community, string object_id)
Returns FALSE and produces a warning.

The test-script is working well, when I run it on the command line by the php-binary => php proto.php

The bug is similiar to Bug #32680
But it look's like it still exists a problem.

Reproduce code:
---------------
<?
print snmpget("1.2.3.4", "secret", "system.sysUpTime.0")."\n";
?>


Expected result:
----------------
Timeticks: (56916419) 6 days, 14:06:04.19

Actual result:
--------------
It look's like the snmp-api won't proper initialized..
When you set doDebugging to 1 in the snmp.conf, you can see, that the 'domain_list' in snmplib/snmp_transport.c on line 346 don't match to "udp", because domain_list is NULL.

I tested it right now with net-snmp-5.2.1.2, but the problem exists with older versions too.

All what I do was installing libxm2 and libsnmp with a ordinary ./configure --prefix=/opt/apache/1.3.33 && make && make install && smile

after this installing php:
./configure --prefix=/opt/apache/1.3.33 --with-snmp=/opt/apache/1.3.33  --with-libxml-dir=/opt/apache/1.3.33 --without-pear --with-apache=../apache_1.3.33
make && make install && smile

and apache:
./configure --activate-module=src/modules/php5/libphp5.a --prefix=/opt/apache/1.3.33
make && make install && smile



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-10 00:57 UTC] p dot burkhalter at gmx dot net
btw: Apache shared module version is working.

apache:
./configure --prefix=/opt/apache/1.3.33 \
--enable-module=so

php:
./configure --prefix=/opt/apache/1.3.33 \
--with-apxs=/opt/apache/1.3.33/bin/apxs \
--with-libxml-dir=/opt/apache/1.3.33 \
--with-snmp=/opt/apache/1.3.33

Problem occurs only by the static module installation.
 [2005-09-10 23:06 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

And make sure you don't have multiple/mixed versions of net-snmp / ucd-snmp header files or libraries in your system.

 [2005-09-18 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, 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".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC