Skip to content

Files

Latest commit

Oct 18, 2015
6a48030 · Oct 18, 2015

History

History
This branch is 45293 commits behind php/php-src:master.

tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 3, 2013
May 3, 2013
Jan 13, 2012
Feb 7, 2013
Jun 15, 2013
Jan 31, 2011
Aug 20, 2011
Mar 17, 2013
Oct 18, 2015
Jan 31, 2011
Aug 31, 2011
May 16, 2015
Sep 2, 2011
Jun 12, 2011
May 3, 2013
Dec 21, 2014
Jan 31, 2011
Dec 21, 2014
Mar 20, 2011
Mar 4, 2011
Dec 21, 2014
Aug 31, 2011
Jan 31, 2011
Dec 21, 2014
Dec 21, 2014
Jul 17, 2011
Aug 20, 2011
Jan 31, 2011
Jan 31, 2011
Jan 31, 2011
May 3, 2013
Dec 21, 2014
Jan 31, 2011
Dec 21, 2014
Mar 20, 2011
Jan 31, 2011
Dec 21, 2014
Oct 7, 2015
SNMP Tests
----------

To enable these tests, you must have :
- PHP compiled with SNMP (--with-snmp)
- an SNMP server running.


** How to test **
You need to give credentials with environment vars if default ones are not
sutable (see snmp_include.inc for more info):
SNMP_HOSTNAME : IPv4 of remote SNMP agent
SNMP_HOSTNAME : IPv6 or remote SNMP agent
SNMP_PORT : SNMP port for queries
SNMP_COMMUNITY : community name
SNMP_COMMUNITY_WRITE : community used for write tests (snmpset()).
SNMP_MIBDIR : Directory containing MIBS

To run test suite you may use this command (presuming that you pwd is where
this README file is located):
> make -C ../../.. test TESTS="`cd ../../..; /bin/ls -1 ext/snmp/tests/*.phpt | xargs echo`"
Running run-tests.php directly will clear your environment and therefore
tests will fail if your SNMP configuration does not fit into default values
specified in snmp_include.inc.

** Configuring the SNMPD server **

On Linux/FreeBSD
--------

- Install package net-snmpd (name may differ based on your distribution).
- Replace config file (by default this is /etc/snmp/snmpd.conf on Linux and
  /usr/local/etc/snmp/snmpd.conf on FreeBSD) with snmpd.conf supplied.
  
Before launching daemon make sure that there is no file /var/net-snmp/snmpd.conf
Delete it if exists. Ingoring to to so will fail SNMPv3 tests.

- Place bigtest.sh near snmpd.conf, tune path to it in snmpd.conf

- Launch snmpd (service snmpd start or /etc/init.d/snmpd start).
  Alternatively you can start snmpd daemon using following command line:
    sudo snmpd -C -c ./snmpd.conf -f -Le


On Windows
----------

[to be completed]