php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #62267
Patch php-5.4-apache-2.4.patch revision 2012-08-05 18:11 UTC by iomranic at gmail dot com
Patch php-5.4-apache-2.4 revision 2012-08-05 17:53 UTC by me at omranic dot com
Patch php5.3-apache24.diff revision 2012-06-08 18:09 UTC by neweracracker at gmail dot com

Patch php-5.4-apache-2.4.patch for Apache2 related Bug #62267

Patch version 2012-08-05 18:11 UTC

Return to Bug #62267 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: iomranic@gmail.com

From 176678f22ec6ab363328e8c671634206487a2c4d Mon Sep 17 00:00:00 2001
From: Abdelrahman Omran <iomranic@gmail.com>
Date: Sun, 5 Aug 2012 19:32:07 +0200
Subject: [PATCH] php-5.4-apache-2.4

---
 sapi/apache2filter/config.w32      |   21 ++++++++++++++++++++-
 sapi/apache2filter/sapi_apache2.c  |    2 +-
 sapi/apache2handler/config.w32     |   23 ++++++++++++-----------
 sapi/apache2handler/sapi_apache2.c |    2 +-
 4 files changed, 34 insertions(+), 14 deletions(-)

diff --git a/sapi/apache2filter/config.w32 b/sapi/apache2filter/config.w32
index 361d031..a90c20d 100755
--- a/sapi/apache2filter/config.w32
+++ b/sapi/apache2filter/config.w32
@@ -23,7 +23,7 @@ ARG_ENABLE('apache2-2filter', 'Build Apache 2.2.x filter', 'no');
 
 if (PHP_APACHE2_2FILTER != "no") {
 	if (PHP_ZTS == "no") {
-		WARNING("Apache2 module requires an --enable-zts build of PHP on windows");
+		WARNING("Apache 2.2 module requires an --enable-zts build of PHP on windows");
 	} else if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2_2FILTER", PHP_PHP_BUILD + "\\include\\apache2_2") &&
 			CHECK_LIB("libhttpd.lib", "apache2_2filter", PHP_PHP_BUILD + "\\lib\\apache2_2") &&
 			CHECK_LIB("libapr-1.lib", "apache2_2filter", PHP_PHP_BUILD + "\\lib\\apache2_2") &&
@@ -37,3 +37,22 @@ if (PHP_APACHE2_2FILTER != "no") {
 		WARNING("Could not find apache2.2 filter libraries/headers");
 	}
 }
+
+ARG_ENABLE('apache2-4filter', 'Build Apache 2.4.x filter', 'no');
+
+if (PHP_APACHE2_4FILTER != "no") {
+	if (PHP_ZTS == "no") {
+		WARNING("Apache 2.4 module requires an --enable-zts build of PHP on windows");
+	} else if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2_4FILTER", PHP_PHP_BUILD + "\\include\\apache2_4") &&
+			CHECK_LIB("libhttpd.lib", "apache2_4filter", PHP_PHP_BUILD + "\\lib\\apache2_4") &&
+			CHECK_LIB("libapr-1.lib", "apache2_4filter", PHP_PHP_BUILD + "\\lib\\apache2_4") &&
+			CHECK_LIB("libaprutil-1.lib", "apache2_4filter", PHP_PHP_BUILD + "\\lib\\apache2_4")
+			) {
+		SAPI('apache2_4filter', 'sapi_apache2.c apache_config.c php_functions.c',
+				'php' + PHP_VERSION + 'apache2_4_filter.dll',
+				'/D PHP_APACHE2_EXPORTS /I win32',
+				'sapi\\apache2_4filter');
+	} else {
+		WARNING("Could not find apache2.4 filter libraries/headers");
+	}
+}
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index e8116f9..21f2bad 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -326,7 +326,7 @@ static int php_apache2_startup(sapi_module_struct *sapi_module)
 
 static sapi_module_struct apache2_sapi_module = {
 	"apache2filter",
-	"Apache 2.0 Filter",
+	"Apache 2.x Filter",
 
 	php_apache2_startup,						/* startup */
 	php_module_shutdown_wrapper,			/* shutdown */
diff --git a/sapi/apache2handler/config.w32 b/sapi/apache2handler/config.w32
index 8d8a6c4..2ebbb26 100644
--- a/sapi/apache2handler/config.w32
+++ b/sapi/apache2handler/config.w32
@@ -38,21 +38,22 @@ if (PHP_APACHE2_2HANDLER != "no") {
 	}
 }
 
-ARG_ENABLE('apache2-3handler', 'Build Apache 2.3.x handler', 'no');
-if (PHP_APACHE2_3HANDLER != "no") {
+ARG_ENABLE('apache2-4handler', 'Build Apache 2.4.x handler', 'no');
+if (PHP_APACHE2_4HANDLER != "no") {
 	if (PHP_ZTS == "no") {
-		WARNING("Apache 2.3 module requires an --enable-zts build of PHP on windows");
-	} else if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2_3HANDLER", PHP_PHP_BUILD + "\\include\\apache2_3") &&
-			CHECK_LIB("libhttpd.lib", "apache2_3handler", PHP_PHP_BUILD + "\\lib\\apache2_3") &&
-			CHECK_LIB("libapr-1.lib", "apache2_3handler", PHP_PHP_BUILD + "\\lib\\apache2_3") &&
-			CHECK_LIB("libaprutil-1.lib", "apache2_3handler", PHP_PHP_BUILD + "\\lib\\apache2_3")
+		WARNING("Apache 2.4 module requires an --enable-zts build of PHP on windows");
+	} else if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2_4HANDLER", PHP_PHP_BUILD + "\\include\\apache2_4") &&
+			CHECK_LIB("libhttpd.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4") &&
+			CHECK_LIB("libapr-1.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4") &&
+			CHECK_LIB("libaprutil-1.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4")
 			) {
-		SAPI('apache2_3handler', 'mod_php5.c sapi_apache2.c apache_config.c php_functions.c',
-				'php' + PHP_VERSION + 'apache2_3.dll',
+		SAPI('apache2_4handler', 'mod_php5.c sapi_apache2.c apache_config.c php_functions.c',
+				'php' + PHP_VERSION + 'apache2_4.dll',
 				'/D PHP_APACHE2_EXPORTS /I win32',
-				'sapi\\apache2handler');
+				'sapi\\apache2_4handler');
 	} else {
-		WARNING("Could not find apache2.3 libraries/headers");
+		WARNING("Could not find apache2.4 libraries/headers");
 	}
 }
 
+
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 900a3a4..1285734 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -353,7 +353,7 @@ static int php_apache2_startup(sapi_module_struct *sapi_module)
 
 static sapi_module_struct apache2_sapi_module = {
 	"apache2handler",
-	"Apache 2.0 Handler",
+	"Apache 2.x Handler",
 
 	php_apache2_startup,				/* startup */
 	php_module_shutdown_wrapper,			/* shutdown */
-- 
1.7.10.msysgit.1

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 02:01:29 2024 UTC