commit 949ef40139a008c9bbf387a677018f3a85fbf75a Author: Christopher Jones Date: Fri Mar 2 00:07:41 2012 +0000 Fixed bug #61172 (Add Apache 2.4 support) diff --git a/configure.in b/configure.in index 7ed2d93..8f579ef 100644 --- a/configure.in +++ b/configure.in @@ -1550,6 +1550,21 @@ cat < Date: Tue Nov 13 19:34:00 2012 +0100 Enabled apache 2.4 handler build option diff --git a/sapi/apache2handler/config.w32 b/sapi/apache2handler/config.w32 index 2f2084c..d09e165 100644 --- a/sapi/apache2handler/config.w32 +++ b/sapi/apache2handler/config.w32 @@ -37,3 +37,22 @@ if (PHP_APACHE2_2HANDLER != "no") { WARNING("Could not find apache2.2 libraries/headers"); } } + +ARG_ENABLE('apache2-4handler', 'Build Apache 2.4.x handler', 'no'); +if (PHP_APACHE2_4HANDLER != "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_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_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'); + } else { + WARNING("Could not find apache 2.4 libraries/headers"); + } +} + --- php-5.2.17/acinclude.m4~ 2013-04-10 12:57:07.000000000 +0200 +++ php-5.2.17/acinclude.m4 2013-04-10 13:22:13.515018845 +0200 @@ -2586,6 +2586,9 @@ dnl AC_DEFUN([PHP_AP_EXTRACT_VERSION],[ ac_output=`$1 -v 2>&1 | grep version` + if test -n "$FORCE_APACHE_VERSION"; then + ac_output="Server version: Apache/${FORCE_APACHE_VERSION} (PLD/Linux)" + fi ac_IFS=$IFS IFS="- /. " commit 390ccd899d73101ad5ddcfc46074a6c83ec178e8 Author: Scott MacVicar Date: Mon Jan 19 19:32:40 2009 +0000 MFH Fix apache2handler under Apache 2.3.0-alpha diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c index 45f7ac3..3b9321a 100644 --- a/sapi/apache2handler/php_functions.c +++ b/sapi/apache2handler/php_functions.c @@ -372,8 +372,12 @@ PHP_MINFO_FUNCTION(apache) char *p; server_rec *serv = ((php_struct *) SG(server_context))->r->server; #if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE) +#if MODULE_MAGIC_NUMBER_MAJOR >= 20081201 + AP_DECLARE_DATA extern unixd_config_rec ap_unixd_config; +#else AP_DECLARE_DATA extern unixd_config_rec unixd_config; #endif +#endif for (n = 0; ap_loaded_modules[n]; ++n) { char *s = (char *) ap_loaded_modules[n]->name; @@ -403,7 +407,11 @@ PHP_MINFO_FUNCTION(apache) php_info_print_table_row(2, "Hostname:Port", tmp); #if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE) +#if MODULE_MAGIC_NUMBER_MAJOR >= 20081201 + snprintf(tmp, sizeof(tmp), "%s(%d)/%d", ap_unixd_config.user_name, ap_unixd_config.user_id, ap_unixd_config.group_id); +#else snprintf(tmp, sizeof(tmp), "%s(%d)/%d", unixd_config.user_name, unixd_config.user_id, unixd_config.group_id); +#endif php_info_print_table_row(2, "User/Group", tmp); #endif