php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #53342
Patch snmpinstallation.txt revision 2010-11-18 10:18 UTC by heinzie_online at hotmail dot com

Patch snmpinstallation.txt for SNMP related Bug #53342

Patch version 2010-11-18 10:18 UTC

Return to Bug #53342 | Download this patch
Patch Revisions:

Developer: heinzie_online@hotmail.com

installation PHP SNMPsupport (v1,v2x,v3) on Windows2003 server with IIS.

#Requirements:

for SNMP v1 and v2x versions you need NET-SNMP installed.
get it here -> http://sourceforge.net/projects/net-snmp/files/net-snmp%20binaries/5.5-binaries/

for SNMP v3 you'll need encryption as well. In that case you need to have 
the visual C++ version 8, OPEN SSL and NET-SNMP installed in that order.

Also the lines containing 'snmp' in php.ini need to be uncommented.



#Installation:

SNMP (v1,v2,v3) on windows2003server with IIS. 

this part ONLY covers installation of SNMP on windows2003 with IIS, not Apache.

Very important is the platform on which you install PHP. You'll need to find the right distributables.

PHP software can be downloaded from the http://www.php.net.  On this site, click on downloads, click on 'windows binaries'. 
You now get redirected to another site of PHP.

If you are running Windows2003server with APACHE, you need to download the VC6 compiled version. Usually tread-safe will do. (download the 'installer' version)
If you are running Windows2003server with IIS, you need to download the VC9 compiled version. ONLY download the TREAD-SAFE version, as the tread unsafe version can demolish your system. (download the 'installer' version)

backup (or take a snapshot of) your server before you begin.

Execute the PHP  installer.

in the installer:

-check FastCGI.
-click on 'scripts' and select 'install entire content on disk'
-click on 'items' and select SNMP, MYSQL, MYQSLI and SOCKETS, for all, select 'install entire content on disk'. Optionally you can add other components that you which to use.
-when prompted for install location, use c:\PHP  (or any other that has NO SPACES in the name).

Download and install the Visual C8 ++ distributables from the Microsoft site. Follow the link given in this site--> http://www.slproweb.com/products/Win32OpenSSL.html

Download and install the OPEN-SSL distributable  (select version Win32 OpenSSL v1.0.0a ). You can get it here--> http://www.slproweb.com/products/Win32OpenSSL.html

Download and install NET-SNMP from here --> http://sourceforge.net/projects/net-snmp/files/net-snmp%20binaries/5.5-binaries/

Please watch carefully what version you need. Use the net-snmp-5.5.0-1.x86.exe  for 32 bit platforms and net-snmp-5.5.0-2.x64.exe for 64bit platforms.
For NET-SNMP, use install path c:\usr\

You are now almost ready.

You only need to enable SNMP in PHP in the configuration file php.ini.

Open c:\php\php.ini and search for lines with SNMP (there should be 2). Un-comment them both (commented lines have a semicolon sign as the first character of the line).

Reboot of the server is not needed (though it might be smart to do it anyway to be sure your server will start after a reboot).

You are ready now to use SNMP with PHP.


#Runtime Configuration:

in PHP.ini verify that these lines exist and are uncommented:

[PHP_SNMP]
extension=php_snmp.dll


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 10:01:29 2024 UTC