php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #35855 Patch to Build PHP_SNMP with NET-SNMP Support
Submitted: 2005-12-30 22:26 UTC Modified: 2013-02-08 05:09 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: larryjadams at comcast dot net Assigned: lytboris (profile)
Status: No Feedback Package: SNMP related
PHP Version: 5.1.1 OS: Win32
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
50 + 50 = ?
Subscribe to this entry?

 
 [2005-12-30 22:26 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-30 22:36 UTC] 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-31 09:11 UTC] 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!!
 [2011-08-21 08:03 UTC] lytboris@php.net
-Package: Feature/Change Request +Package: SNMP related
 [2011-08-21 20:24 UTC] lytboris@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: lytboris
 [2011-08-21 20:24 UTC] lytboris@php.net
Is this still an pressing issue?
 [2013-02-08 05:09 UTC] lytboris@php.net
-Status: Feedback +Status: No Feedback
 [2013-02-08 05:09 UTC] lytboris@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 07:01:27 2024 UTC