Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21353 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74108 invoked by uid 1010); 29 Dec 2005 14:18:30 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 74093 invoked from network); 29 Dec 2005 14:18:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Dec 2005 14:18:30 -0000 X-Host-Fingerprint: 204.127.202.55 sccrmhc11.comcast.net NetCache Data OnTap 5.x Received: from ([204.127.202.55:58473] helo=sccrmhc11.comcast.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id BB/61-28258-630F3B34 for ; Thu, 29 Dec 2005 09:18:30 -0500 Received: from basement (pcp04335117pcs.warn1201.mi.comcast.net[68.41.21.188]) by comcast.net (sccrmhc11) with SMTP id <20051229141826011005d6n7e>; Thu, 29 Dec 2005 14:18:26 +0000 To: Date: Thu, 29 Dec 2005 09:18:28 -0500 Message-ID: <000f01c60c82$bd36ba00$6500a8c0@basement> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0010_01C60C58.D460B200" X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Thread-Index: AcYMgrzLI+s/1ox8Rd2vszXDHyqwHg== Subject: Proposed Modifications to PHP_SNMP Extension for Consideration From: larryjadams@comcast.net ("Larry Adams") ------=_NextPart_000_0010_01C60C58.D460B200 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0011_01C60C58.D460B200" ------=_NextPart_001_0011_01C60C58.D460B200 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 and commented out "#include ", 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 ------=_NextPart_001_0011_01C60C58.D460B200 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hello Internals = List! =20 For some time now, the PHP_SNMP extension for Windows has used the dated = and no=20 longer supported (in development) UCD-SNMP libraries.  This = situation is=20 problematic, as there have been a number of changes and bug = fixes to the=20 extension that require the NET-SNMP libraries.  I have been = able to=20 make the php_snmp.dll in Windows utilizing the NET-SNMP libraries, but had to make = changes to=20 the following two files:
 
config.w32
snmp.dsp
 
I have attached = the two=20 files as = reference.  However, there remains a development issue = that=20 requires a more skilled programmer to resolve.  If I make the package = unaltered,  I receive the following two compiler=20 errors:
 
..\php_build\include\net-snmp\library\system.h(77) : = error C2371:=20 'DIR' : redefinition; different basic=20 types
       =20 c:\msvc\php-5.0.4\TSRM\readdir.h(34) : see declaration of=20 'DIR'
..\php_build\include\net-snmp\library\system.h(80) : error = C2371:=20 'readdir' : redefinition; different basic=20 types
       =20 c:\msvc\php-5.0.4\TSRM\readdir.h(38) : see declaration of=20 'readdir'

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

This change will=20 fix multiple annoyances such as the automatic creation of the=20 "c:/usr/snmp/persist" directory by the php_snmp.dll file, and, as stated previously, the lack of = important=20 php_snmp functions and bug fixes = in=20 Windows.
 
Regards,
 
Larry=20 Adams
The = Cacti=20 Group
 
------=_NextPart_001_0011_01C60C58.D460B200-- ------=_NextPart_000_0010_01C60C58.D460B200 Content-Type: text/plain; name="snmp.dsp" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="snmp.dsp" # Microsoft Developer Studio Project File - Name=3D"snmp" - Package = Owner=3D<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=3Dsnmp - Win32 Release_TS !MESSAGE This is not a valid makefile. To build this project using = NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE=20 !MESSAGE NMAKE /f "snmp.mak". !MESSAGE=20 !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE=20 !MESSAGE NMAKE /f "snmp.mak" CFG=3D"snmp - Win32 Release_TS" !MESSAGE=20 !MESSAGE Possible choices for configuration are: !MESSAGE=20 !MESSAGE "snmp - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link = Library") !MESSAGE "snmp - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link = Library") !MESSAGE=20 # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=3Dcl.exe MTL=3Dmidl.exe RSC=3Drc.exe !IF "$(CFG)" =3D=3D "snmp - Win32 Release_TS" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release_TS" # PROP BASE Intermediate_Dir "Release_TS" # PROP BASE Ignore_Export_Lib 0 # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release_TS" # PROP Intermediate_Dir "Release_TS" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I = "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D = "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_SNMP" /D ZTS=3D1 /YX = /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I = "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=3D0 = /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D = "SNMP_EXPORTS" /D "COMPILE_DL_SNMP" /D ZTS=3D1 /D "ZEND_WIN32" /D = "PHP_WIN32" /D HAVE_SNMP=3D1 /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x406 /d "NDEBUG" # ADD RSC /l 0x406 /d "NDEBUG" BSC32=3Dbscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=3Dlink.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib = comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib = odbc32.lib odbccp32.lib php5ts.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib = advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib = odbccp32.lib php5ts.lib libsnmp.lib netsnmp.lib wsock32.lib /nologo /dll = /machine:I386 /out:"..\..\Release_TS/php_snmp.dll" = /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" !ELSEIF "$(CFG)" =3D=3D "snmp - Win32 Debug_TS" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Debug_TS" # PROP BASE Intermediate_Dir "Debug_TS" # PROP BASE Ignore_Export_Lib 0 # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Debug_TS" # PROP Intermediate_Dir "Debug_TS" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I = "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D = "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_SNMP" /D ZTS=3D1 /YX = /FD /c # ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\.." /I "..\..\main" /I = "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=3D1 = /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D = "SNMP_EXPORTS" /D "COMPILE_DL_SNMP" /D ZTS=3D1 /D "ZEND_WIN32" /D = "PHP_WIN32" /D HAVE_SNMP=3D1 /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x406 /d "NDEBUG" # ADD RSC /l 0x406 /d "NDEBUG" BSC32=3Dbscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=3Dlink.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib = comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib = odbc32.lib odbccp32.lib php5ts.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib = advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib = odbccp32.lib php5ts_debug.lib libsnmp.lib netsnmp.lib wsock32.lib = /nologo /dll /machine:I386 /out:"..\..\Debug_TS/php_snmp.dll" = /libpath:"..\..\Debug_TS" !ENDIF=20 # Begin Target # Name "snmp - Win32 Release_TS" # Name "snmp - Win32 Debug_TS" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=3D.\snmp.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=3D.\php_snmp.h # End Source File # End Group # End Target # End Project ------=_NextPart_000_0010_01C60C58.D460B200--