Re: [PHP] SNMP via PHP
Tom Rogers wrote: Did you see this:http://www.php.net/manual/en/book.snmp.php Once you know the answer, then the question is easy ... In order to use your link one has to know how SNMP works and understand things like 'object_id' ... http://www.jffnms.org/ turned up and is just what I was looking for and can see the devices and report what each is providing. I still need to get cacti to see those devices, but once one has SOMETHING working then things get a lot easier :) The question I should have been asking was php network monitoring system I still need to add monitoring of the domain list and that each domain is being correctly returned, but now I have something I can pull apart and play with and push my own parts back into. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP via PHP
OK I've spent the last two hours going through pages of crap generated by google, and that includes google crap created by searches on sites like http://www.phpbuilder.com - cause mainly of cause by php pages on sites supporting other languages :( Certainly it seems that PHP is preferred even to website java and ruby ... I had some problems over the weekend with the network here and decided it was time to get some monitoring in place locally. cacti simply loaded up and I have working system, but now I'm having trouble getting SNMP sorted on the target machines. So I started looking for an editor to handle the MIB data and keep hitting one dead end after another. I'm sure there must be something out there using php-snmp for a browser? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SNMP via PHP
Bastien Koert On 2012-10-15, at 7:09 AM, Lester Caine les...@lsces.co.uk wrote: OK I've spent the last two hours going through pages of crap generated by google, and that includes google crap created by searches on sites like http://www.phpbuilder.com - cause mainly of cause by php pages on sites supporting other languages :( Certainly it seems that PHP is preferred even to website java and ruby ... I had some problems over the weekend with the network here and decided it was time to get some monitoring in place locally. cacti simply loaded up and I have working system, but now I'm having trouble getting SNMP sorted on the target machines. So I started looking for an editor to handle the MIB data and keep hitting one dead end after another. I'm sure there must be something out there using php-snmp for a browser? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Xenoss is a python solution with tons of monitoring capability. It's well worth a look Bastien -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SNMP via PHP
Bastien wrote: Xenoss is a python solution with tons of monitoring capability. It's well worth a look If I wanted to move to python then I would not be asking here ;) I have enough of python on Hg and what I'm looking for here is PHP code that I can massage to do what I need ... I'm still working my way around this. cacti provides a nice monitoring layer and is PHP, but is not helping to set up SNMP on the client machines, so I'm looking for something that can help edit MIB files and also check the SNMP link to remote machines ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SNMP via PHP
There appears to be quite a few examples, https://www.google.com/search?q=php+snmp+examplehttps://www.google.com/search?q=php+snmp+exampleaq=0oq=php+snmp+sugexp=chrome,mod=0sourceid=chromeie=UTF-8, and tutorials, https://www.google.com/search?q=php+snmp+examplehttps://www.google.com/search?q=php+snmp+exampleaq=0oq=php+snmp, on google. On Mon, Oct 15, 2012 at 7:25 AM, Lester Caine les...@lsces.co.uk wrote: Bastien wrote: Xenoss is a python solution with tons of monitoring capability. It's well worth a look If I wanted to move to python then I would not be asking here ;) I have enough of python on Hg and what I'm looking for here is PHP code that I can massage to do what I need ... I'm still working my way around this. cacti provides a nice monitoring layer and is PHP, but is not helping to set up SNMP on the client machines, so I'm looking for something that can help edit MIB files and also check the SNMP link to remote machines ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=**contacthttp://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.**ukhttp://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SNMP via PHP
There appears to be quite a few examples, https://www.google.com/search?q=php+snmp+examplehttps://www.google.com/search?q=php+snmp+exampleaq=0oq=php+snmp+sugexp=chrome,mod=0sourceid=chromeie=UTF-8, and tutorials, https://www.google.com/search?q=php+snmp+examplehttps://www.google.com/search?q=php+snmp+exampleaq=0oq=php+snmp, on google. On Mon, Oct 15, 2012 at 7:25 AM, Lester Caine les...@lsces.co.uk wrote: Bastien wrote: Xenoss is a python solution with tons of monitoring capability. It's well worth a look If I wanted to move to python then I would not be asking here ;) I have enough of python on Hg and what I'm looking for here is PHP code that I can massage to do what I need ... I'm still working my way around this. cacti provides a nice monitoring layer and is PHP, but is not helping to set up SNMP on the client machines, so I'm looking for something that can help edit MIB files and also check the SNMP link to remote machines ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=**contacthttp://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.**ukhttp://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SNMP via PHP
Jonathan Sundquist wrote: There appears to be quite a few examples, https://www.google.com/search?q=php+snmp+example https://www.google.com/search?q=php+snmp+exampleaq=0oq=php+snmp+sugexp=chrome,mod=0sourceid=chromeie=UTF-8, and tutorials, https://www.google.com/search?q=php+snmp+example https://www.google.com/search?q=php+snmp+exampleaq=0oq=php+snmp, on google. Care to point out something there which is ACTUALLY usable? Many of the 'php examples' only have a connection to php because they are on .php hosted pages ... But it's not examples I'm looking for but something like http://sourceforge.net/projects/php-netanalyzer/ which is still coming up on many searches but not even available just to play with :( -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SNMP via PHP
Hello Lester, Monday, October 15, 2012, 9:09:13 PM, you wrote: OK I've spent the last two hours going through pages of crap generated by google, and that includes google crap created by searches on sites like http://www.phpbuilder.com - cause mainly of cause by php pages on sites supporting other languages :( Certainly it seems that PHP is preferred even to website java and ruby ... I had some problems over the weekend with the network here and decided it was time to get some monitoring in place locally. cacti simply loaded up and I have working system, but now I'm having trouble getting SNMP sorted on the target machines. So I started looking for an editor to handle the MIB data and keep hitting one dead end after another. I'm sure there must be something out there using php-snmp for a browser? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk Did you see this: http://www.php.net/manual/en/book.snmp.php -- Best regards, Tommailto:trog...@kwikin.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP Documentation and Features
Has anyone here had much experience with the SNMP module? I started working with it a few weeks ago to find the documentation, configuration and features lacking. I figure its a low priority module for Zend and would like to get some help documenting things that are missing and maybe even taking a crack at the module source if anyone has enough C experince to dig into ucd/net snmp. Randall Wiggins http://www.zonedzero.com/
[PHP] SNMP Functions
Hello guys, i'm running php on Leopard 10.5.5 with native php and snmp builds. I was hoping someone could tell me how can i activate the php snmp in order to use the snmp functions. I've searched everywhere for this but i didn't find anything usefull. Appreciate any kind of answer. Regards Rui Quelhas
Re: [PHP] SNMP Functions
Rui Quelhas wrote: Hello guys, i'm running php on Leopard 10.5.5 with native php and snmp builds. I was hoping someone could tell me how can i activate the php snmp in order to use the snmp functions. I've searched everywhere for this but i didn't find anything usefull. Appreciate any kind of answer. Having no idea about leopard and how it does stuff, this might sound stupid. Is there a package for php-snmp (on redhat/debian, php is modular - you can install php-ldap or php-snmp or php-mysql or .. without having to re-compile php) ? If leopard doesn't have packages, you'll probably have to build php from scratch. http://www.php.net/manual/en/install.macosx.php -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP support on compile from source FastCGI
Hello everyone, I'm trying to add the SNMP module with a compile-from-source PHP 5.2.1 installation. This is on a Fedora Core 5 system with target web server being lighttpd. This is the configure script that I have: ./configure --enable-fastcgi --enable-discard-path --enable-force-redirect --with-mysql --with-mbstring --with-mcrypt --with-gd --with-jpeg-dir=/usr/lib/ --with-zlib-dir=/usr/lib/ --with-net-snmp --with-gnu-ld I don't have any errors whatsoever at this point. However, when I do the make I get an error like the one below: /usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status make: *** [sapi/cgi/php] Error 1 I tried to check if it was missing a package but I see that libtool-ltdl is already installed on the server. Anyone know what could be wrong here? Regards, Matt -- Stand before it and there is no beginning. Follow it and there is no end. Stay with the ancient Tao, Move with the present. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP SNMP
Greetings, Seem to have a bit of a problem I can't figure out. I'm trying to query servers via SNMP with PHP's snmpget function. Everything seems to work fine, no problems at all - except I'd like the web page to print the string value instead of the numeric value (I.E. OK for the Compaq Drive Array vs 1). Now I've configured everything as best I can tell, and I have the page loading the appropriate MIB file ( snmp_read_mib(/usr/local/share/snmp/mibs/CPQIDA.MIB)). Running it from the terminal via 'php mypage.php' returns all the correct values, I see Ok, instead of 1. But accessing it via the web produces nothing - no output. It doesn't matter how I set the get, I've tried varying it with CPQIDA-MIB::cpqDaCntlrBoardStatus.0, cpqDaCntlrBoardStatus.0, .iso.org.dod.internet.private.enterprises.compaq.cpqDriveArray.cpqDaCom ponent.cpqDaCntlr.cpqDaCntlrTable.cpqDaCntlrEntry.cpqDaCntlrBoardStatus. 0 - all work fine running it via the terminal, but not via the web page. Does anyone have any ideas at all about this? Anything else I can check? If I snmpget the numeric OID (.1.3.6.1.4.1.232.3.2.2.1.1.10.0) it does work, but only returns the numeric value. System Info: PHP 5.0.5 Net-SNMP 5.1.1 Php compiled with --with-snmp and --enable-ucd-snmp-hack Thanks. Jeremy Pavleck Network Engineer - Systems Management IT Networks and Infrastructure Direct Line: 612-977-5881 Toll Free: 1-888-CAPELLA ext. 5881 Fax: 612-977-5053 E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Capella University 225 South 6th Street, 9th Floor Minneapolis, MN 55402 www.capella.edu http://www.capella.edu/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP SNMP
Pavleck, Jeremy D. wrote: Greetings, Seem to have a bit of a problem I can't figure out. I'm trying to query servers via SNMP with PHP's snmpget function. Everything seems to work fine, no problems at all - except I'd like the web page to print the string value instead of the numeric value (I.E. OK for the Compaq Drive Array vs 1). Now I've configured everything as best I can tell, and I have the page loading the appropriate MIB file ( snmp_read_mib(/usr/local/share/snmp/mibs/CPQIDA.MIB)). Running it from the terminal via 'php mypage.php' returns all the correct values, I see Ok, instead of 1. But accessing it via the web produces nothing - no output. It doesn't matter how I set the get, I've tried varying it with CPQIDA-MIB::cpqDaCntlrBoardStatus.0, cpqDaCntlrBoardStatus.0, .iso.org.dod.internet.private.enterprises.compaq.cpqDriveArray.cpqDaCom ponent.cpqDaCntlr.cpqDaCntlrTable.cpqDaCntlrEntry.cpqDaCntlrBoardStatus. 0 - all work fine running it via the terminal, but not via the web page. Does the webpage show anything at all? Sounds like you have a fatal error.. Does the web php version have snmp support? Check with a phpinfo page. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SNMP problem is TCP
You're not showing enough code... What does function zamiana look like? And is the code you gave us porty_set.php line 70? Or is that some other code we haven't seen? Is 'pliki' a PHP software package you got somewhere else? They may have a more focussed forum / mailing list / whatever that can help you faster than we can here... On Sun, March 19, 2006 4:08 pm, wood-gd wrote: Hello // I sorry my english //my script is control TCP protocol $ip=83.190.177.45; // IP $community=public; //community (password) echo $stan = '12'; // deletetcb - del connect $LocalAddress = snmpwalk($ip,$community,tcp.tcpConnTable.tcpConnEntry.tcpConnLocalAddre ss); $LocalPort = snmpwalk($ip,$community,tcp.tcpConnTable.tcpConnEntry.tcpConnLocalPort ); $RemAddress = snmpwalk($ip,$community,tcp.tcpConnTable.tcpConnEntry.tcpConnRemAddress ); $RemPort = snmpwalk($ip,$community,tcp.tcpConnTable.tcpConnEntry.tcpConnRemPort); echo $wynik='1.3.6.1.2.1.6.13.1.'.zamiana($LocalAddress[$id],IpAddress: ).'.'.$LocalPort[$id].'.'.zamiana($RemAddress[$id], IpAddress: ).'.'.$RemPort[$id]; snmpset($ip, $community, $wynik, i, $stan); //-- zamiana($LocalAddress[$id],IpAddress: ) this is function //-- Is error 12 1.3.6.1.2.1.6.13.1.0.0.0.0.135.0.0.0.0.0 Warning: snmpset(): Could not add variable: system.sysUpTime.6.1.2.1.6.13.1.0.0.0.0.135.0.0.0.0.0 i 12 in e:\program files\apache group\apache\users\snmp\pliki\porty_set.php on line 70 //-- hellp Me. My e-mail [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP problem is TCP
Hello // I sorry my english //my script is control TCP protocol $ip=83.190.177.45; // IP $community=public; //community (password) echo $stan = '12'; // deletetcb - del connect $LocalAddress = snmpwalk($ip,$community,tcp.tcpConnTable.tcpConnEntry.tcpConnLocalAddre ss); $LocalPort = snmpwalk($ip,$community,tcp.tcpConnTable.tcpConnEntry.tcpConnLocalPort ); $RemAddress = snmpwalk($ip,$community,tcp.tcpConnTable.tcpConnEntry.tcpConnRemAddress ); $RemPort = snmpwalk($ip,$community,tcp.tcpConnTable.tcpConnEntry.tcpConnRemPort); echo $wynik='1.3.6.1.2.1.6.13.1.'.zamiana($LocalAddress[$id],IpAddress: ).'.'.$LocalPort[$id].'.'.zamiana($RemAddress[$id], IpAddress: ).'.'.$RemPort[$id]; snmpset($ip, $community, $wynik, i, $stan); //-- zamiana($LocalAddress[$id],IpAddress: ) this is function //-- Is error 12 1.3.6.1.2.1.6.13.1.0.0.0.0.135.0.0.0.0.0 Warning: snmpset(): Could not add variable: system.sysUpTime.6.1.2.1.6.13.1.0.0.0.0.135.0.0.0.0.0 i 12 in e:\program files\apache group\apache\users\snmp\pliki\porty_set.php on line 70 //-- hellp Me. My e-mail [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php-snmp-4.3.11-2.5 for RH8?
We are experiencing the 'usmAES192PrivProtocol in Unknown' error in the Apache error log due to a conflict between Net-SNMP 5.2.1 and the php-snmp package. Well of course, Fedora 3 has an update available at (and detailed) here: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=155975 Check out this thread on the Cacti forum: http://forums.cacti.net/viewtopic.php?p=30981#30981 Any chance that a package for RH8 will become available? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] snmp nodes
I am trying to get object data from a cisco AS5300 universal gateway through snmp. i am using the getsnmp,walsnmp etc functions of php. my proble is. i want to get cisco data using node address 1.3.6.1.4.1.9( when we start from the root of the tree) but php starts to look from the MIB node and hence says no object with the specified id exixts. please suggest me a way to make php start from the root of the tree, not theMIB node. arun -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP MIB selection under php4
Hello all, I was wondering if there is any way to tell PHP4 to load a specific MIB file? PHP5 has a snmp_read_mib(), but php4 lacks this function. Any help would be apreciated. Thanks, Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP traps generation
Hi all, does anybody know any good library (class|script) for generating SNMP traps wirtten in PHP? thanks in advance, A. *** Alessandro Vitale Jr. Software Engineer Tiscali International Network Spa +39 070 4601678 [EMAIL PROTECTED] *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SNMP traps generation
If you find something, it's interesting me !! Because of ASN1 encryption, it's hard to send a simple SNMP Trap with somes lines of code. Alessandro Vitale [EMAIL PROTECTED] a écrit dans le message de news:[EMAIL PROTECTED] Hi all, does anybody know any good library (class|script) for generating SNMP traps wirtten in PHP? thanks in advance, A. *** Alessandro Vitale Jr. Software Engineer Tiscali International Network Spa +39 070 4601678 [EMAIL PROTECTED] *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP PLEASE HELPP!!!!!!!!!!
? $a = snmpwalk(216.18.74.170, public, ); for($i=0; $i551; $i++) { print $a[$i]; print br; } ? This is my code and i recieve a huge list. Some of it i understand but i can't understand the OID part and all the ips there. Can you please help me Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SNMP PLEASE HELPP!!!!!!!!!!
On Tue, 2004-03-30 at 13:17, Victor wrote: ? $a = snmpwalk(216.18.74.170, public, ); for($i=0; $i551; $i++) { print $a[$i]; print br; } ? This is my code and i recieve a huge list. Some of it i understand but i can't understand the OID part and all the ips there. Can you please help me Thanks What are you trying to do? -- Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP SNMP
I'm trying to access some SNMP agents. I have to have use SNMP v2, otherwise the snmp requests time out. PHP seems to use SNMP v1 by default. How can I change this? EX: I need it to replicate the following command snmpget -v2c ... Luke Bailey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php snmp Version
Hi everybody, i was googled a long time looking how to pass the snmp version to the snmpget or snmpwalk functions. The only response was from a guy who proposed to change the source code. I don't fully understand, the code is ready to do snmp v2c querys but it doesn't exists the parameters... i am not scared about modifying the code... but i just dont get it !!! TIA, Lucas Lain -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SNMP mib resoultion
Chris W. Parker Wrote : Guy Fraser mailto:[EMAIL PROTECTED] on Friday, September 12, 2003 1:53 PM said: This is my third attempt to send this message and I havn't seen one show up yet. :{ I hope this gets through. I got it!! Great... Now if someone could answer my question. Does any know how to get additional mibs to be resolved on FreeBSD or Linux ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP mib resoultion
Does any know how to get additional mibs to be resolved on FreeBSD or Linux ? This is my third attempt to send this message and I havn't seen one show up yet. :{ I hope this gets through. -- Guy Fraser Network Administrator The Internet Centre 780-450-6787 , 1-888-450-6787 There is a fine line between genius and lunacy, fear not, walk the line with pride. Not all things will end up as you wanted, but you will certainly discover things the meek and timid will miss out on. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SNMP mib resoultion
Guy Fraser mailto:[EMAIL PROTECTED] on Friday, September 12, 2003 1:53 PM said: This is my third attempt to send this message and I havn't seen one show up yet. :{ I hope this gets through. I got it!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP v2
i'm having a heck of a time getting snmpv2 to work with php. does anyone else have it working yet? i'm on rh 7.3 with apache v 1.3.23-14 and php v 4.1.2-7.3.6 on a test system not on the internet. what i'm trying to accomplish is a mib walk with php on a device that only supports snmpv2. here is the code i'm currently using: ? $a = snmpwalk(10.10.1.1, cn, ); for ($i=0; $icount($a); $i++) { echo $a[$i] . br; } ? works great on snmpv1 devices- but snmpv2 returns this: Warning: snmpwalk() [function.snmpwalk]: No response from 10.10.1.1 in /home/httpd/html/snmp.php on line 2 r -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP v2
i'm having a heck of a time getting snmpv2 to work with php. does anyone else have it working yet? i'm on rh 7.3 with apache v 1.3.23-14 and php v 4.1.2-7.3.6 on a test system not on the internet. what i'm trying to accomplish is a mib walk with php on a device that only supports snmpv2. here is the code i'm currently using: ? $a = snmpwalk(10.10.1.1, cn, ); for ($i=0; $icount($a); $i++) { echo $a[$i] . br; } ? works great on snmpv1 devices- but snmpv2 returns this: Warning: snmpwalk() [function.snmpwalk]: No response from 10.10.1.1 in /home/httpd/html/snmp.php on line 2 r -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] snmp problems
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, Suse 8.0, ucdsnmp-4.2.3-145, tried both php-4.1.2 and 4.3.0, compiled from source, snmp support enabled. bash# snmpget 1.2.3.4 communitystring .1.3.6.1.2.1.2.2.1.1.2 interfaces.ifTable.ifEntry.ifIndex.2 = 2 But if I try the following lines: $a=snmpwalkoid(1.2.3.4, communitystring, .1.3.6.1.2.1.2.2.1.1.2); print_r ($a) I get only Array ( ) Does anyone else experience the same problem? Or is there some way to find out if the problem is caused by: - - suse - - ucd - - php - - me being ignorant ? Thank you all. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+TQ4AlDG6Z61nQGIRAnkFAKCjkTEGx+rMXV3vUc7NySgZm0l7/gCgsmgG LiTy00n62rux9RfdjA4sKgU= =Wa5J -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] UCD-SNMP 4.2.5 and PHP-SNMP
I have an application that uses php's snmp support to gather some information. I run several servers that are using this application and all of the servers are running redhat-7.2. In redhat 7.2 the OS initially ships with ucd-snmp-4.2.1-7.i386.rpm. This works fine with my applications. I make every effort to keep these servers patched and up to date, and unfortunately redhat has released some ucd-snmp patches that bring the version up to ucd-snmp-4.2.5-7.72.0.i386.rpm. When I try to install that version of snmp, the snmp support breaks in php. The output is completely whacked, and I wish I could explain more, but generally output that used to poll correctly now shows 0 and certain items show the OIDspacevalue instead of just the value. So I'll have a column in the app that has (ucd-snmp 4.2.1 output) valuea 25 (ucd-snmp 4.2.5 output) valuea transmission.1.3.5.blah 2 The output is all over the place. One thing that I do know has changed with this release of ucd-snmp is that it now comes with libwrap support. Any way that could affect it. I've tried recompiling php with the new includes. Of course there are some patches that are dependent upon this working, so if anyone has any insight on how to proceed I would appreciate it. Any suggestions on how to get the most up to date ucd-snmp patches. At this time my option is not to upgrade and it doesn't appear that there is a bug fix or anything else that is required in that newest release, however, the new redhat-7.3 boxes that I need to deploy in place of the redhat-7.2 boxes are going to probably have the same problem. Thanks, Brian Seppanen [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP Support Problem
Hi all, I have a problem with use of snmp functions of php. I have compiled UCD binaries and PHP for support snmp functions ( steps by PHP.NET ) but i always receive this error : Fatal error: Call to undefined function: snmpwalk() ... ... and this for all snmp functions. Where i can get a little tutorial to install and setup step-by-step snmp support on php and linux red-hat ?!?! Thanks in advance to all and sorry for my bad english Regards
[PHP] snmp / php / linux /error
Iam trying to use my php file in a Linux machine. #!/usr/local/bin/snmp_guard.php -q ? $bat = snmpget(192.168.10.8, pub_likt, .1.3.6.1.4.1.2606.1.2.12.0); $sum = snmpget(192.168.10.8, pub_likt, .1.3.6.1.4.1.2606.1.2.13.0); $drift = snmpget(192.168.10.8, pub_likt, .1.3.6.1.4.1.2606.1.2.10.0); $verk = snmpget(192.168.10.8, pub_likt, .1.3.6.1.4.1.2606.1.2.11.0); echo $bat; ? Then I start it with php snmp_guard.php All I get is Call to undefeind funcion snmpget() WHY?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP - LOG
Hi I would like to collect data from snmpget and log it. Anyone have a idea how to do this? // maas, Sweden -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SNMP - LOG
Here is a example using snmprealwalk() to make a simple dump to a textfile. The script filters out some things that atleast I don't need. To get more verbose output comment out $walk = snmp_nice_array($walk); and/or change snmp_set_quick_print(1); to snmp_set_quick_print(0);. Example with most information. Array ( [system.sysORTable.sysOREntry.sysORID.1] = system.sysORTable.sysOREntry.sysORID.1 = OID: ifMIB [system.sysORTable.sysOREntry.sysORID.2] = system.sysORTable.sysOREntry.sysORID.2 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB [system.sysORTable.sysOREntry.sysORID.3] = system.sysORTable.sysOREntry.sysORID.3 = OID: tcpMIB [system.sysORTable.sysOREntry.sysORID.4] = system.sysORTable.sysOREntry.sysORID.4 = OID: ip ) ( ) // Kdr(oo) /--\/ / ||| * ||---|| ~~ ~~ ?php $file = dump.txt; // file to save all things to. $host = 127.0.0.1; // SNMP host. $community = public; // SNMP community name. $object = ; // SNMP Object, empty to get all. $fp = fopen($file,w+); // Open file. /* Function that removes objectname in value from a snmprealwalk result */ function snmp_nice_array ($array) { foreach($array as $key = $value) { $value = preg_replace(/^$key /,,$value); $array[$key] = $value; } return $array; } snmp_set_quick_print(1); // Less information. $walk = snmprealwalk($host,$community,$object); // Fetch the data. /* Example of what $walk might contain now. Array ( [system.sysORTable.sysOREntry.sysORID.1] = system.sysORTable.sysOREntry.sysORID.1 ifMIB [system.sysORTable.sysOREntry.sysORID.2] = system.sysORTable.sysOREntry.sysORID.2 .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB [system.sysORTable.sysOREntry.sysORID.3] = system.sysORTable.sysOREntry.sysORID.3 tcpMIB [system.sysORTable.sysOREntry.sysORID.4] = system.sysORTable.sysOREntry.sysORID.4 ip ) */ $walk = snmp_nice_array($walk); // Run the result thru snmp_nice_array(). /* Example of what $walk might contain after snmp_nice_array(). Array ( [system.sysORTable.sysOREntry.sysORID.1] = ifMIB [system.sysORTable.sysOREntry.sysORID.2] = .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB [system.sysORTable.sysOREntry.sysORID.3] = tcpMIB [system.sysORTable.sysOREntry.sysORID.4] = ip ) */ foreach($walk as $key = $value) fputs($fp,$key = $value\n); // Write data to file. /* Example of what the file might contain. system.sysORTable.sysOREntry.sysORID.1 = ifMIB system.sysORTable.sysOREntry.sysORID.2 = .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB system.sysORTable.sysOREntry.sysORID.3 = tcpMIB system.sysORTable.sysOREntry.sysORID.4 = ip */ fclose($fp); // Close file. ? Hi I would like to collect data from snmpget and log it. Anyone have a idea how to do this? // maas, Sweden -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP Queries and Leftover Sockets
We recently implemented a snmp polling utility using PHP4.0.6 on RedHat Linux 7.2 with an Apache webserver. When people using the polling utility do a poll we get leftover sockets that do not seem to go away, and after a while the webserver needs to be restarted. Is there any way in PHP to force these connections closed after a while? Has anyone else seen this. I've got several boxes all exhibiting the same behavior after this utility was put in place. here's some example lsof output, which I got doing lsof -i -n | grep httpd | grep UDP httpd 27987 root8u IPv4 16889303 UDP *:3865 httpd 27987 root9u IPv4 16889304 UDP *:3866 httpd 27987 root 10u IPv4 16891398 UDP *:4054 httpd 27987 root 11u IPv4 16895660 UDP *:1826 httpd 27987 root 12u IPv4 16897200 UDP *:1904 On this particular box I have 731 open UDP sockets, and this is after the webserver was started yesterday. Restarting the webserver does resolve the issue. Thanks for any insight. Brian Seppanen [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] snmp replies not printed
Hello, I have installed php 4.1.2 and ucd 4.2.4 both from tarballs on a linux box, and compiled php both as an apache module and standalone (same options, except for the --with-apxs). Now, when I use snmpwalk or whatever other function from within apache, it works (almost) correctly: snmp_set_quick_print causes php to return both the OID and the value although the manual says different, but I can live with that. the problem is that a simple script run from the standalone interpreter on the same machine behaves very strange. Example: #!/usr/local/bin/php -q ? snmp_set_quick_print(1); $test=snmpwalk(1.2.3.4,public,system); for (reset($test); $i = key($test); next($i)){ echo $test[$i]\n; } does not print ANYTHING (nothing in php.log, also. I have error_reporting = E_ALL in php.ini) but if I do a snmpget(1.2.3.4,public,system.sysName.0) I get system.sysName.0 sysName not set which is (almost) correct. the snmp* commands from the ucd-snmp package work just fine. Does anyone have some clue on what could have happened? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php snmp
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.. ?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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SNMP with 4.1.0
* Peter Hicks ([EMAIL PROTECTED]) [Dec 24. 2001 17:39]: gcc: /usr/local/snmp/lib/.libs/libsnmp.so: No such file or directory Does libsnmp.so actually exist in /usr/local/snmp/lib? Yes (a symlink to another file, which exists), and SNMP is detected fine through 'configure'. OK, another try. You say the file exists, but does it exist in /usr/local/snmp/lib/.libs? If not, you could always try a symlink to get them acquainted. Chances are, you've already tried that, correct? -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 UNIX: measuring in inconvenient units since 57,974,400! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] SNMP with 4.1.0
All, I am having terrible difficulty trying to build 4.1.0 as an Apache shared module. Without SNMP support, all is well. However, as soon as I add --with-snmp=..., I get the following at compile time: gcc: /usr/local/snmp/lib/.libs/libsnmp.so: No such file or directory make[3]: *** [snmp.la] Error 1 make[3]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext/snmp' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext/snmp' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext' make: *** [all-recursive] Error 1 This only happens when PHP is being compiled as a shared module, and only happens when SNMP support is compiled in. Anyone got any ideas? Festive wishes, Peter. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SNMP with 4.1.0
* Peter Hicks ([EMAIL PROTECTED]) [Dec 24. 2001 15:26]: I am having terrible difficulty trying to build 4.1.0 as an Apache shared module. Without SNMP support, all is well. However, as soon as I add --with-snmp=..., I get the following at compile time: gcc: /usr/local/snmp/lib/.libs/libsnmp.so: No such file or directory Does libsnmp.so actually exist in /usr/local/snmp/lib? make[3]: *** [snmp.la] Error 1 make[3]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext/snmp' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext/snmp' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext' -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Enter any 11 digit prime number to continue. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SNMP with 4.1.0
Hi Brian On Mon, 24 Dec 2001, Brian Clark wrote: gcc: /usr/local/snmp/lib/.libs/libsnmp.so: No such file or directory Does libsnmp.so actually exist in /usr/local/snmp/lib? Yes (a symlink to another file, which exists), and SNMP is detected fine through 'configure'. I have two theories. The first is that libsnmp.so is the name of the Apache module that is being compiled and it is being referenced incorrectly; the second is that a spurious .libs/ has appeared from somewhere. As I said in the first e-mail, it works fine when PHP is to be statically compiled in to Apache, which leads me to believe my first theory more than the second Peter. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SNMP with 4.1.0
* Peter Hicks ([EMAIL PROTECTED]) [Dec 24. 2001 17:39]: Does libsnmp.so actually exist in /usr/local/snmp/lib? Yes (a symlink to another file, which exists), and SNMP is detected fine through 'configure'. I have two theories. The first is that libsnmp.so is the name of the Apache module that is being compiled and it is being referenced incorrectly; the second is that a spurious .libs/ has appeared from somewhere. OK, how about building the DSO via apxs manually and see if you get any errors? IIRC, you can then place it in the correct directory in the apache source and use --enable-shared=snmp in apache's configure *I think*. Why, let me ask Santa.. Yes, Santa says he believes that should work. -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Sure FAT32 corrupts your files, but look how fast it is. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SNMP with 4.1.0
* Brian Clark ([EMAIL PROTECTED]) [Dec 24. 2001 22:26]: OK, how about building the DSO via apxs manually and see if you get any errors? IIRC, you can then place it in the correct directory in the apache source and use --enable-shared=snmp in apache's configure *I think*. Why, let me ask Santa.. Yes, Santa says he believes that should work. Nevermind, I need to quit smoking the mistletoe. You're trying to build PHP with that configure option, which is *DUH* the point of this list. Just ignore everything I said.. -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Why doesn't DOS ever say Excellent command or filename? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php snmp compile error
I've downloaded php 4.1.0 and ucd-snmp 4.2.3. I was able to compile snmp successfully. Then i tried to compile php with snmp support. Followign is my configure parameters ./configure --with-apxs=/usr/sbin/apxs --enable-calendar --with-pgsql --with-snmp --enable-ucd-snmp-hack --enable-wddx --enable-sysvsem --with-sysvshm --enable-inline-optimization --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl configure works fine but when i do a make i get following error: Zend/.libs/libZend.al(default_store.o):/usr/local/ucd-snmp-4.2.3/snmplib/default_store.c:308: first defined here /usr/local/lib/libsnmp.a(snmp_alarm.o): In function `init_alarm_post_config': /usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:53: multiple definition of `init_alarm_post_config' Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:53: first defined here /usr/local/lib/libsnmp.a(snmp_alarm.o): In function `set_an_alarm': /usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:185: multiple definition of `set_an_alarm' Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:185: first defined here /usr/local/lib/libsnmp.a(snmp_alarm.o): In function `init_snmp_alarm': /usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:60: multiple definition of `init_snmp_alarm' Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:60: first defined here /usr/local/lib/libsnmp.a(snmp_alarm.o): In function `sa_update_entry': /usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:67: multiple definition of `sa_update_entry' Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:67: first defined here /usr/local/lib/libsnmp.a(snmp_alarm.o): In function `snmp_alarm_unregister': /usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:88: multiple definition of `snmp_alarm_unregister' Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:88: first defined here /usr/local/lib/libsnmp.a(snmp_alarm.o): In function `sa_find_next': /usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:111: multiple definition of `sa_find_next' Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:111: first defined here /usr/local/lib/libsnmp.a(snmp_alarm.o): In function `sa_find_specific': /usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:120: multiple definition of `sa_find_specific' Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:120: first defined here /usr/local/lib/libsnmp.a(snmp_alarm.o): In function `run_alarms': /usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:131: multiple definition of `run_alarms' Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:131: first defined here /usr/local/lib/libsnmp.a(snmp_alarm.o): In function `alarm_handler': /usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:164: multiple definition of `alarm_handler' Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:164: first defined here /usr/local/lib/libsnmp.a(snmp_alarm.o): In function `get_next_alarm_delay_time':/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:170: multiple definition of `get_next_alarm_delay_time' Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:170: first defined here /usr/local/lib/libsnmp.a(snmp_alarm.o): In function `snmp_alarm_register': /usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:204: multiple definition of `snmp_alarm_register' Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:204: first defined here -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] snmp segmentation fault
Hi all I compiled php 4.1.0 with snmp --with-snmp the compilation was smooth and had no problem, but when i try to execute the following statment i get segmentation fault. $x = snmpwalk (localhost, public, ); The same error had occured with ver 4.0.6. I'm using Red Hat linux 7.2 and the ucd-snmp that comes along it. kancha __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] SNMP and PHP
Hi, I need some help in compiling SNMP functions with PHP 4.06 on Solaris 2.6. What I did so far I downloaded UCD SNMP package and installed it. I compiled php with '--with-snmp=shared' + '--enable-ucd-snmp-hack' and installed everything without any errors. When I do a phpconfig on that installation I can see this configure option. Everything textbook. BUT when I try to use any of the snmp function calls I get an error message saying this is an undefined function. Any ideas, please!! Thanks Heiko -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] SNMP and PHP
I had the same problem and never got it working on Linux. Posted a very similar question and got one response from someone that got it working on FreeBSD but that was it. Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.210.7145 Fax: 816.753.1952 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 10:45 AM To: [EMAIL PROTECTED] Subject: [PHP] SNMP and PHP Hi, I need some help in compiling SNMP functions with PHP 4.06 on Solaris 2.6. What I did so far I downloaded UCD SNMP package and installed it. I compiled php with '--with-snmp=shared' + '--enable-ucd-snmp-hack' and installed everything without any errors. When I do a phpconfig on that installation I can see this configure option. Everything textbook. BUT when I try to use any of the snmp function calls I get an error message saying this is an undefined function. Any ideas, please!! Thanks Heiko -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] SNMP OID translation
Hi folks Something I find confusing about using UCD-SNMP with PHP 4.0.6 is that I can't pass something such as: enterprises.cisco.workgroup.ciscoStackMIB.portGrp.portTable.portEntry.portName to snmpwalkoid - it sits around, then complains that this is an invalid object identifier. Is it possible to get PHP to translate textual OIDs in to numeric OIDs, and vice versa? Automatically? Peter. --- Peter Hicks e-mail: peter.hicks(at)poggs.co.uk Network Architect web: http://www.poggs.com/ Poggs Computer Services bobcode: K l E m2 C B-x O L S T A H b6 D1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] SNMP
I have been trying to add snmp support into PHP 4.0.4pl1 and 4.0.6 without success. The box currently has ucd-snmp-4.2.1 on it and is working fine with our mod_perl installation. When we configure it with --with-snmp and --enable-ucd-snmp-hack it configures fine and lists the it has found SNMP. The compile goes smoothly but when I try to run it returns: Fatal error: Call to undefined function: snmpget() in ./snmpmonitor. php on line 2 It is like snmp is not even compiled in. Our configure options are: ./configure --with-gd=/usr/local/gd1.3 --with-mysql=/usr/local/mysql --enable-debug=no --enable-track-vars=yes --with-msql=/usr/local/Hughes --enable-ftp --enable-snmp --with-snmp=shared --enable-ucd-snmp-hack We did notice that configure stated that in order to use the shared libs elsewhere we should use libtool or 1 or 3 other options. Not sure how to do this part. When we do it without the shared option for --with-snmp or replace it with /usr/local it returns: ++ | *** ATTENTION ***| || | Something is likely to be messed up here, because the configure| | script was not able to detect a simple feature on your platform. | | This is often caused by incorrect configuration parameters. Please | | see the file debug.log for error messages. | || | If you are unable to fix this, send the file debug.log to the | | [EMAIL PROTECTED] mailing list and include appropiate | | information about your setup. | ++ Debug.log has: /usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestInit' /usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestFinal' /usr/local/lib/libsnmp.so: undefined reference to `EVP_md5' /usr/local/lib/libsnmp.so: undefined reference to `HMAC' /usr/local/lib/libsnmp.so: undefined reference to `EVP_sha1' /usr/local/lib/libsnmp.so: undefined reference to `des_cbc_encrypt' /usr/local/lib/libsnmp.so: undefined reference to `des_key_sched' /usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestUpdate' /usr/local/lib/libsnmp.so: undefined reference to `RAND_bytes' /usr/local/lib/libsnmp.so: undefined reference to `des_ncbc_encrypt' Any suggestions would be great... -Bob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php, snmp, and mibs
Hi, Sorry if this is a repeat question, I just can't seem to find an answer to this question. I am running php4 on NT. I've been able to connect to some network equipment with the snmp commands, and retrieve the results. But it's the list of values, which can be tough to correspond to the MIB. Is there a way to get at least the x.x.x.x.x.x from a MIB file into an array of some kind, or even better, to get the object names and such into an array? Thanks for any information, Mike _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] php, snmp, and mibs
Mike, I haven't worked with MIB files myself, but what you're describing sounds like it could be solved with regex's...can you post a snippet of what file looks like that you're trying to extract from? -jack -Original Message- From: Mike Backes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 2:28 PM To: [EMAIL PROTECTED] Subject: [PHP] php, snmp, and mibs Hi, Sorry if this is a repeat question, I just can't seem to find an answer to this question. I am running php4 on NT. I've been able to connect to some network equipment with the snmp commands, and retrieve the results. But it's the list of values, which can be tough to correspond to the MIB. Is there a way to get at least the x.x.x.x.x.x from a MIB file into an array of some kind, or even better, to get the object names and such into an array? Thanks for any information, Mike _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] php, snmp, and mibs
as someone else suggested... a regexp is probably the thing you want. since i have no idea what the format of a MIB is, i cannot give you any example. but to find dotted num's, use something akin to this: preg_match_all('/(\d+)(?=\.?)/', $MIB, $matches); -Original Message- From: Mike Backes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 2:28 PM To: [EMAIL PROTECTED] Subject: [PHP] php, snmp, and mibs Hi, Sorry if this is a repeat question, I just can't seem to find an answer to this question. I am running php4 on NT. I've been able to connect to some network equipment with the snmp commands, and retrieve the results. But it's the list of values, which can be tough to correspond to the MIB. Is there a way to get at least the x.x.x.x.x.x from a MIB file into an array of some kind, or even better, to get the object names and such into an array? Thanks for any information, Mike _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] SNMP Difficulties?!?!?!?!?
I am having trouble getting the SNMP library to work. It is compiled in and basic calls work but I don't understand what the problem is with using it through PHP. This call from the Unix Shell works: snmpget XX.XX.XX.XX community_name enterprises.838.3.1.1.1.1.0 enterprises.838.3.1.1.1.1.0 = "04/09/2001 12:37:48:13" But the function snmpget("XX.XX.XX.XX","community_name","enterprises.838.3.1.1.1.1.0"); in PHP Returns: Warning: Invalid object identifier: enterprises.838.3.1.1.1.1.0 in /usr/local/apache/htdocs/index.php on line 23 I tried just using the number representation of that string and it gives the same thing. (i.e. replace entrerprises with it's numerical equivalent) What I don't understand is that snmpget("XX.XX.XX.XX","community_name","system.sysDescr.0"); Works just fine and returns the information about the box. Some of the numerical ones work well also but none of the "enterprises" section is retrievable from PHP. Anyone have any ideas? Thanks, Zach -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Snmp, php and Win2K
Anyone have any examples of php that uses snmp to get the details of bandwidth usage from a Win2K server (ie Bytes sent/received on a particular interface)? Thanks. -- Richard Heyes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] SNMP question
I am attempting to compile PHP with Net-SNMP package from Sourceforge (ucd-snmp-4.2.i386.rh6.2.tar.gz). configure and make/make install work fine. starting apache returns: Cannot load /usr/local/apache/libexec/libphp4.so into server: libsnmp-0.4.2.so: cannot open shared object file: No such file or directory What directory is it trying to load from, or what environment variable is it referring to? The file does exist under /usr/local/lib. Redhat 6.2 Apache 1.3.17 PHP 4.0.4pl1 --with-esoob --enable-ftp --with-xml --with-apxs --enable-track-vars --enable-force-cgi-redirect --with-mysql Thanks. Michael Geier CDMSports Systems Administration EMail: [EMAIL PROTECTED] Phone: 314.991.1511 x 6505 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]