LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-18-2002, 10:55 AM   #1
BaerRS
Member
 
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


Hello...

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 126.4.202.157 public

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

if I use the fallowing code threw apache..

<?php
$a = snmpwalk("126.4.202.157", "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... ??

Scott
 
Old 03-28-2003, 03:08 AM   #2
condurre
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.

Condurre
 
Old 04-21-2003, 08:31 AM   #3
BaerRS
Member
 
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...
 
  


Reply


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 08:09 AM
NET-SNMP vs UCD-SNMP nitind Red Hat 1 05-20-2005 06:08 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM
SNMP from PHP batatudo Programming 2 03-19-2004 10:11 PM
snmp (ucd-snmp, net-snmp) markus1982 Linux - Software 1 11-21-2002 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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