Edit report at https://bugs.php.net/bug.php?id=35855&edit=1

 ID:                 35855
 Updated by:         lytbo...@php.net
 Reported by:        larryjadams at comcast dot net
 Summary:            Patch to Build PHP_SNMP with NET-SNMP Support
-Status:             Feedback
+Status:             No Feedback
 Type:               Feature/Change Request
 Package:            SNMP related
 Operating System:   Win32
 PHP Version:        5.1.1
 Assigned To:        lytboris
 Block user comment: N
 Private report:     N

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.




Previous Comments:
------------------------------------------------------------------------
[2011-08-21 20:24:02] lytbo...@php.net

Is this still an pressing issue?

------------------------------------------------------------------------
[2005-12-31 09:11:59] larryjadams at comcast dot net

Here are the two patch files:

http://home.comcast.net/~larryjadams/config.w32.patch
http://home.comcast.net/~larryjadams/snmp.dsp.patch

Thanks!!

------------------------------------------------------------------------
[2005-12-30 22:36:55] larryjadams at comcast dot net

Patch for snmp.dsp:
--- snmp.dsp    2005-12-27 17:21:19.312500000 -0500
+++ Backup/snmp.dsp     2004-01-17 07:59:48.000000000 -0500
@@ -54,7 +54,7 @@
 # ADD BSC32 /nologo
 LINK32=link.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"
+# 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 wsock32.lib /nologo /dll /machine:I386 
/out:"..\..\Release_TS/php_snmp.dll" /libpath:"..\..\Release_TS" 
/libpath:"..\..\Release_TS_Inline"

 !ELSEIF  "$(CFG)" == "snmp - Win32 Debug_TS"

@@ -81,7 +81,7 @@
 # ADD BSC32 /nologo
 LINK32=link.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"
+# 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 wsock32.lib /nologo /dll 
/machine:I386 /out:"..\..\Debug_TS/php_snmp.dll" /libpath:"..\..\Debug_TS"

 !ENDIF

Patch for config.w32:
--- config.w32  2005-12-30 16:19:21.281250000 -0500
+++ Backup/config.w32   2003-12-19 12:00:10.000000000 -0500
@@ -4,18 +4,13 @@
 ARG_WITH("snmp", "SNMP support", "no");

 if (PHP_SNMP != "no") {
-       if (CHECK_HEADER_ADD_INCLUDE("snmp.h", "CFLAGS_SNMP", PHP_PHP_BUILD + 
"\\include\\ucd-snmp;" + PHP_PHP_BUILD + "\\include\\net-snmp;" + PHP_SNMP)) {
-               if (CHECK_LIB("netsnmp.lib", "snmp", PHP_SNMP)) {
-                       EXTENSION('snmp', 'snmp.c');
-                       AC_DEFINE('HAVE_SNMP', 1);
-                       AC_DEFINE('HAVE_NET_SNMP', 1);
-                       AC_DEFINE('MSVC_PERL', 1);
-               } else if (CHECK_LIB("libsnmp.lib", "snmp", PHP_SNMP)) {
+
+       if (CHECK_HEADER_ADD_INCLUDE("snmp.h", "CFLAGS_SNMP", PHP_PHP_BUILD + 
"\\include\\ucd-snmp;" + PHP_PHP_BUILD + "\\include\\net-snmp;" + PHP_SNMP) &&
+                       CHECK_LIB("libsnmp.lib", "snmp", PHP_SNMP)) {
                        EXTENSION('snmp', 'snmp.c');
+
                        AC_DEFINE('HAVE_SNMP', 1);
-               } else {
-                       WARNING("snmp not enabled; libraries and headers not 
found");
-               }
+
        } else {
                WARNING("snmp not enabled; libraries and headers not found");
        }

------------------------------------------------------------------------
[2005-12-30 22:26:40] larryjadams at comcast dot net

Description:
------------
The current "Windows" version of the php_snmp extension is built with the 
undersupported ucd-snmp libraries.  There are several issues continuing to 
utilize the ucd-snmp issues included unfixed bugs in Win32 build.

The attached patch files will allow PHP 5.0.5 to be built utilizing either the 
NET-SNMP or the UCD-SNMP libraries.  As per the comments in config.m4, NET-SNMP 
should be tried first.

Reproduce code:
---------------
I will attach as a comment to this bug report both patches to the snmp.dsp and 
config.w32 files.

Expected result:
----------------
N/A

Actual result:
--------------
N/A


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=35855&edit=1

Reply via email to