Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-18-2002, 11:55 AM   #1
Registered: Oct 2001
Location: Columbus, Ohio
Distribution: all.. but mainly SuSe--- looks like it changing to Red Hat
Posts: 119

Rep: Reputation: 15
snmp / php


Could some one please direct me in the right direction.....

I am trying to do an snmpwalk on an snmp device.. I have set up the community and IP correctly.. threw PHP

I can do a manually by doing the fallowing:

snmpwalk public

from a terminal,,, and I do responses.... (verifyin the device, IP & community are correct)

if I use the fallowing code threw apache..

$a = snmpwalk("", "public", "");
for ($i=0; $i < count($a); $i++) {
echo $a[$i];

and call this threw a browser

I get the fallowing:

and it seem as the page times out... but its very quick...almost as soon as I call the page.

Other PHP pages work fine...
I'm running on a Dell PIII Duel 500 w/512Meg Ram running SuSE 7.3 SMP

I have compiled net-snmp
using ethereal.. I can see the snmp gets & get-next ... as well as the responses...

Anyone have any idea... ??

Old 03-28-2003, 04:08 AM   #2
LQ Newbie
Registered: Mar 2003
Location: San Ramon, CA
Distribution: Slackware
Posts: 20

Rep: Reputation: 0
At least with Slackware 8.1, the stock php installation isn't compiled with SNMP support. You may have to recompile php with snmp support.

Additionally, it seems the older versions of php require you to use an the older ucd-snmp releases to work properly. This may not be true for the current version of php.

Old 04-21-2003, 09:31 AM   #3
Registered: Oct 2001
Location: Columbus, Ohio
Distribution: all.. but mainly SuSe--- looks like it changing to Red Hat
Posts: 119

Original Poster
Rep: Reputation: 15
To follow up on this post.. in case anyone eles is haveing trouble with this also...

php was build with the udp-snmp links... and the on shiped with RH 8.0 is now net-snmp...

the problem has been fixed in the RH 9.0 release of RH.
though now theirs another issue... you can to snmpwalk on the RH 9.0 box... it kills the deamon...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure ucd-snmp and net-snmp? Tazzmanian Linux - Networking 1 05-27-2005 09:09 AM
NET-SNMP vs UCD-SNMP nitind Red Hat 1 05-20-2005 07:08 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-18-2004 12:10 AM
SNMP from PHP batatudo Programming 2 03-19-2004 11:11 PM
snmp (ucd-snmp, net-snmp) markus1982 Linux - Software 1 11-21-2002 11:45 AM

All times are GMT -5. The time now is 10:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration