You are here: Re: SNMPv3 functions « PHP Programming Language « IT news, forums, messages
Re: SNMPv3 functions

Posted by Schroeder, AJ on 04/12/06 16:53

acrux14@hotmail.com wrote:
> Hi,
>
> I need to poll SNMP variables from Cisco routers using SNMPv3
> (security reasons).
>
> I'm trying to use the little-documented SNMPv3 functions (see
> http://us3.php.net/manual/en/ref.snmp.php, where argument lists seem
> to be truncated, and
> http://zugeschaut-und-mitgebaut.de/php/function.snmp3_get.html).
>
> I can get snmp3_get function to work fine, but when I try
> snmp3_getnext I get a "Fatal error: Call to undefined function"
> error... does this mean that function is not compiled into the
> system? Seems strange that snmp3_get is and snmp3_getnext isn't...
> How can I go about confirming this? And fixing it? Any pointers will
> be much appreciated!!!
>
> More details follow:
>
> jschnack@maxwell ~/develop/srt $ cat snmpv3-test.php
> <?php
> $desc = snmp3_get('x.x.x.x', 'snmpuser', 'authPriv', 'md5',
> 'password', 'des', 'password', 'sysDescr.0');
> print "$desc\n";
>>
> jschnack@maxwell ~/develop/srt $ php snmpv3-test.php
> STRING: Cisco IOS Software, C2600 Software (C2600-ADVIPSERVICESK9-M),
> Version 12.3(11)T7, RELEASE SOFTWARE (fc3)
> Technical Support: http://www.cisco.com/techsupport
> Copyright (c) 1986-2005 by Cisco Systems, Inc.
> Compiled Fri 29-Jul-05 22:38 by dchih
> jschnack@maxwell ~/develop/srt $
> jschnack@maxwell ~/develop/srt $
> jschnack@maxwell ~/develop/srt $ cat snmpv3-test2.php
> <?php
> $x = snmp3_getnext('x.x.x.x', 'snmpuser', 'authNoPriv', 'md5',
> 'password', 'des', 'password',
> 'ip.ipRouteTable.ipRouteEntry.ipRouteDest');
> print "$x\n";
>>
> jschnack@maxwell ~/develop/srt $
> jschnack@maxwell ~/develop/srt $ php snmpv3-test2.php
>
> Fatal error: Call to undefined function: snmp3_getnext() in
> /home/jschnack/develop/srt/snmpv3-test2.php on line 2
> jschnack@maxwell ~/develop/srt $
>
>
> BTW, I *am* able to poll the ipRouteDest variable using snmp getnext
> function from the command line (NET-SNMP version: 5.2.1.2), so I don't
> think I'm misinterpreting the SNMP side of the problem.
>
> Thanks,
>
> J.

What version of PHP are you running. I am on Redhat Enterprise 4 and they
are way behind in versions. I have tried to get SNMPv2 to work in my current
version (4.3.9) and those functions didn't make it in until 4.4.x.

According to this website
(http://zugeschaut-und-mitgebaut.de/php/function.snmp3_getnext.html) the
snmp3_getnext function isn't available until version 5 while the snmp3_get
function dates all the way back to 4.3.0.

HTH,

AJ Schroeder

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация