[PHP] php & snmp

2002-04-18 Thread Scott Baer

Hello...

Could some one please direct me in the right direction.

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

I can do a manually by doing the fallowing:

snmpwalk 126.4.202.157 public

from a terminal,,, and I do get some responses

if I use the fallowing code threw apache..

 

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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] is their a way to run a command as root ???

2002-04-24 Thread Scott Baer

Is their a way to run a command as root..or another user..

I know their are a log of security issues with allowing this.. I will
tighten down security after I get it to work.

He is what I am trying to do.
I have squid & squid guard set up..

in squids redirect url.. (on the same box).. I would like to modify a
checked/domain list (I'm currently doing this manually...  though I think I
know how to do this ..or at least the book I have does.)  after it is
modified I need to run the fallowing...

--update--
#!/bin/sh
./squidguard -C all#or a specific db.. but all covers... all
/etc/init.d/squid restart

I can run this as root or as squid..

I did create a test script which just copied some files in the /tmp dir..
--test--
#!/bin/sh
echo "this is a test"
cp /usr/local/httpd/htdocs/Block.html /tmp/Block.html

I can run this.. and it works with the fallowing







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php