Ivan Roseland wrote:



Ditto,

I have been trying to build apache2 + php4 with SNMP support on
redhat 8 all day.. The snmp support from the RPM is quite broken.


If you look in /usr/include you will find two directories

net-snmp
ucd-snmp

ucd-snmp is what php wants.

Of course here is what the .h files look like in there

#ifdef UCD_COMPATIBLE

#include <net-snmp/library/asn1.h>

#else

#error "Please update your headers or configure using --enable-ucd-snmp-compatibility"

#endif


what the hell?

I have a feeling that I will also be going back to fresh source for SNMP
as well...


Thanks Redhat, I didnt *really* like useing RPMS to make my life suck less.

That or perhapse the php developer guys could add another config directive something like


--redhat8-SNMP-sucks-ass-workaround





I am back,


So, I uninstalled the snmp rpms the apache rpms and the php rpms.
I rebuilt everything from hand. The problem was with the wacky
redhat net-snmp ucd-snmp setup.


Now, for my next bitch..

Why the hell is it that the returned values for
things keeps changing

$syscontact_got = snmpget ("$system_name", "$key", .1.3.6.1.2.1.1.4.0");

I used to be able to just use the string..
Then I hade to split it and just use the parts I wanted





ok now that part that is really pissing me off..




I need to make a table of software installed and the installed date


so I do this

$a = snmpwalk ("$system_name", "$key", ".1.3.6.1.2.1.25.6.3.1.2");
$b = snmpwalk ("$system_name", "$key", ".1.3.6.1.2.1.25.6.3.1.5");

echo "<table BORDER COLS=2 WIDTH=\"100%\" NOSAVE >\n";


$count = count($b);

echo "<TR>\n<TD>Name and Version</TD>\n<TD>Installed Date</TD>\n</TR>\n";




for ($i=0; $i<$count; $i++){

list ($new_a, $x, $x1 ) = split (" ", $a[$i], 3);
list ($new_b, $x, $x1 ) = split (" ", $b[$i], 3);

echo "<TR>\n<TD>$new_a</TD>\n<TD>$new_b x $x x $x1</TD>\n</TR>\n";
}




This was freeking working.. Now I get a list of packages in $new_a and nothing in $new_b $b[i] turns up a hex value though..


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



Reply via email to