# Proposed Modifications to PHP_SNMP Extension for Consideration

- Thread: https://externals.io/message/21353
- Original archive: https://news-web.php.net/php.internals/21353
- Started by Larry Adams on 2005-12-29T14:18:28+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #21353 — Larry Adams — 2005-12-29T14:18:28+00:00

URL: https://externals.io/message/21353#21353

Hello Internals List!  For some time now, the PHP_SNMP extension for Windows
has used the dated and no longer supported (in development) UCD-SNMP
libraries.  This situation is problematic, as there have been a number of
changes and bug fixes to the extension that require the NET-SNMP libraries.
I have been able to make the php_snmp.dll in Windows utilizing the NET-SNMP
libraries, but had to make changes to the following two files:
 
config.w32
snmp.dsp
 
I have attached the two files as reference.  However, there remains a
development issue that requires a more skilled programmer to resolve.  If I
make the package unaltered,  I receive the following two compiler errors:
 
..\php_build\include\net-snmp\library\system.h(77) : error C2371: 'DIR' :
redefinition; different basic types
        c:\msvc\php-5.0.4\TSRM\readdir.h(34) : see declaration of 'DIR'
..\php_build\include\net-snmp\library\system.h(80) : error C2371: 'readdir'
: redefinition; different basic types
        c:\msvc\php-5.0.4\TSRM\readdir.h(38) : see declaration of 'readdir'

In order to build the dll file correctly, I edited
<net-snmp/library/utilities.h> and commented out "#include
<net-snmp/library/system.h>", but that appears to be a hack.
 
I have a bug open in the PHP Bug Database speaking to this issue as follows:
 
#35696	 The function "snmp_set_oid_numeric_print" does not exist on the
Win32 platform	

This change will fix multiple annoyances such as the automatic creation of
the "c:/usr/snmp/persist" directory by the php_snmp.dll file, and, as stated
previously, the lack of important php_snmp functions and bug fixes in
Windows.
 
Regards,
 
Larry Adams
The Cacti Group

---

## #21354 — Nuno Lopes — 2005-12-29T15:10:07+00:00

URL: https://externals.io/message/21353#21354 · In reply to: #21353

The config.w32 didn't pass through. If you change the extension to .txt, we 
will be able to receive it.

Nuno


----- Original Message ----- 
> Hello Internals List!  For some time now, the PHP_SNMP extension for 
> Windows
> has used the dated and no longer supported (in development) UCD-SNMP
> libraries.  This situation is problematic, as there have been a number of
> changes and bug fixes to the extension that require the NET-SNMP 
> libraries.
> I have been able to make the php_snmp.dll in Windows utilizing the 
> NET-SNMP
> libraries, but had to make changes to the following two files:
>
> config.w32
> snmp.dsp
>
> I have attached the two files as reference.  However, there remains a
> development issue that requires a more skilled programmer to resolve.  If 
> I
> make the package unaltered,  I receive the following two compiler errors:
>
> ..\php_build\include\net-snmp\library\system.h(77) : error C2371: 'DIR' :
> redefinition; different basic types
>        c:\msvc\php-5.0.4\TSRM\readdir.h(34) : see declaration of 'DIR'
> ..\php_build\include\net-snmp\library\system.h(80) : error C2371: 
> 'readdir'
> : redefinition; different basic types
>        c:\msvc\php-5.0.4\TSRM\readdir.h(38) : see declaration of 'readdir'
>
> In order to build the dll file correctly, I edited
> <net-snmp/library/utilities.h> and commented out "#include
> <net-snmp/library/system.h>", but that appears to be a hack.
>
> I have a bug open in the PHP Bug Database speaking to this issue as 
> follows:
>
> #35696 The function "snmp_set_oid_numeric_print" does not exist on the
> Win32 platform
>
> This change will fix multiple annoyances such as the automatic creation of
> the "c:/usr/snmp/persist" directory by the php_snmp.dll file, and, as 
> stated
> previously, the lack of important php_snmp functions and bug fixes in
> Windows.
>
> Regards,
>
> Larry Adams
> The Cacti Group
