]> granicus.if.org Git - php/commitdiff
Fixed bug #61172 (Add Apache 2.4 support)
authorChristopher Jones <sixd@php.net>
Fri, 2 Mar 2012 00:07:41 +0000 (00:07 +0000)
committerChristopher Jones <sixd@php.net>
Fri, 2 Mar 2012 00:07:41 +0000 (00:07 +0000)
NEWS
configure.in
sapi/apache2filter/config.m4
sapi/apache2handler/config.m4

diff --git a/NEWS b/NEWS
index 467acb7d14aacfbdd35b80c22d2bfad180ebf978..bd00ffd372cd073e4080e3211deeb16ccf296919 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,9 @@ PHP                                                                        NEWS
   . Fixed memory leak in substr_replace. (Pierrick)
   . make max_file_uploads ini directive settable outside of php.ini (Rasmus)
 
+- Installation
+  . Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)
+
 01 Mar 2012, PHP 5.4.0 
 
 - Installation:
index 7701d8bbe1e19f814c3ffcc80e49057af1a14cb7..0a6fcd10eac39075818f6743bd5312669759661d 100644 (file)
@@ -1587,6 +1587,21 @@ cat <<X
 X
   fi
 
+  if test "$PHP_SAPI" = "apache2handler" || test "$PHP_SAPI" = "apache2filter"; then
+    if test "$APACHE_VERSION" -ge 2004001; then
+      if test -z "$APACHE_THREADED_MPM"; then
+cat <<X
++--------------------------------------------------------------------+
+|                        *** WARNING ***                             |
+|                                                                    |
+| You have built PHP for Apache's current non-threaded MPM.          |
+| If you change Apache to use a threaded MPM you must reconfigure    |
+| PHP with --enable-maintainer-zts                                   |
+X
+      fi
+    fi
+  fi
+
   # Warn about linking Apache with libpthread if oci8 extension is enabled on linux.
   if test "$PHP_OCI8" != "no"; then
     if test "$PHP_SAPI" = "apache"; then
index b10720a18aa73bb32520891c9352fc05d1e7945c..c49488d1824ff2eb0dbb2dd12e8e62f594be65c1 100644 (file)
@@ -39,7 +39,6 @@ if test "$PHP_APXS2FILTER" != "no"; then
   APXS_BINDIR=`$APXS -q BINDIR`
   APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
   APXS_CFLAGS=`$APXS -q CFLAGS`
-  APXS_MPM=`$APXS -q MPM_NAME`
   APU_BINDIR=`$APXS -q APU_BINDIR`
   APR_BINDIR=`$APXS -q APR_BINDIR`
 
@@ -118,8 +117,16 @@ if test "$PHP_APXS2FILTER" != "no"; then
     ;;
   esac
 
-  if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser"; then
-    PHP_BUILD_THREAD_SAFE
+  if test "$APACHE_VERSION" -lt 2004001; then
+    APXS_MPM=`$APXS -q MPM_NAME`
+    if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
+      PHP_BUILD_THREAD_SAFE
+    fi
+  else
+    APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
+    if test -n "$APACHE_THREADED_MPM"; then
+      PHP_BUILD_THREAD_SAFE
+    fi
   fi
   AC_MSG_RESULT(yes)
   PHP_SUBST(APXS)
index 95217908fd075517e2b95c9cd8b6d160d9d91bfc..702f91f5d23cfdc22ef00b94bcdca8bbdce29c02 100644 (file)
@@ -38,7 +38,6 @@ if test "$PHP_APXS2" != "no"; then
   APXS_BINDIR=`$APXS -q BINDIR`
   APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
   APXS_CFLAGS=`$APXS -q CFLAGS`
-  APXS_MPM=`$APXS -q MPM_NAME`
   APU_BINDIR=`$APXS -q APU_BINDIR`
   APR_BINDIR=`$APXS -q APR_BINDIR`
 
@@ -117,8 +116,16 @@ if test "$PHP_APXS2" != "no"; then
     ;;
   esac
 
-  if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
-    PHP_BUILD_THREAD_SAFE
+  if test "$APACHE_VERSION" -lt 2004001; then
+    APXS_MPM=`$APXS -q MPM_NAME`
+    if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
+      PHP_BUILD_THREAD_SAFE
+    fi
+  else
+    APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
+    if test -n "$APACHE_THREADED_MPM"; then
+      PHP_BUILD_THREAD_SAFE
+    fi
   fi
   AC_MSG_RESULT(yes)
   PHP_SUBST(APXS)