Skip to content

Commit 15cd45e

Browse files
committed
Fixed bug #61172 (Add Apache 2.4 support)
1 parent 02f6937 commit 15cd45e

File tree

4 files changed

+38
-6
lines changed

4 files changed

+38
-6
lines changed

NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ PHP NEWS
66
. Fixed memory leak in substr_replace. (Pierrick)
77
. make max_file_uploads ini directive settable outside of php.ini (Rasmus)
88

9+
- Installation
10+
. Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)
11+
912
01 Mar 2012, PHP 5.4.0
1013

1114
- Installation:

configure.in

+15
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,21 @@ cat <<X
15871587
X
15881588
fi
15891589
1590+
if test "$PHP_SAPI" = "apache2handler" || test "$PHP_SAPI" = "apache2filter"; then
1591+
if test "$APACHE_VERSION" -ge 2004001; then
1592+
if test -z "$APACHE_THREADED_MPM"; then
1593+
cat <<X
1594+
+--------------------------------------------------------------------+
1595+
| *** WARNING *** |
1596+
| |
1597+
| You have built PHP for Apache's current non-threaded MPM. |
1598+
| If you change Apache to use a threaded MPM you must reconfigure |
1599+
| PHP with --enable-maintainer-zts |
1600+
X
1601+
fi
1602+
fi
1603+
fi
1604+
15901605
# Warn about linking Apache with libpthread if oci8 extension is enabled on linux.
15911606
if test "$PHP_OCI8" != "no"; then
15921607
if test "$PHP_SAPI" = "apache"; then

sapi/apache2filter/config.m4

+10-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ if test "$PHP_APXS2FILTER" != "no"; then
3939
APXS_BINDIR=`$APXS -q BINDIR`
4040
APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
4141
APXS_CFLAGS=`$APXS -q CFLAGS`
42-
APXS_MPM=`$APXS -q MPM_NAME`
4342
APU_BINDIR=`$APXS -q APU_BINDIR`
4443
APR_BINDIR=`$APXS -q APR_BINDIR`
4544

@@ -118,8 +117,16 @@ if test "$PHP_APXS2FILTER" != "no"; then
118117
;;
119118
esac
120119

121-
if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser"; then
122-
PHP_BUILD_THREAD_SAFE
120+
if test "$APACHE_VERSION" -lt 2004001; then
121+
APXS_MPM=`$APXS -q MPM_NAME`
122+
if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
123+
PHP_BUILD_THREAD_SAFE
124+
fi
125+
else
126+
APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
127+
if test -n "$APACHE_THREADED_MPM"; then
128+
PHP_BUILD_THREAD_SAFE
129+
fi
123130
fi
124131
AC_MSG_RESULT(yes)
125132
PHP_SUBST(APXS)

sapi/apache2handler/config.m4

+10-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ if test "$PHP_APXS2" != "no"; then
3838
APXS_BINDIR=`$APXS -q BINDIR`
3939
APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
4040
APXS_CFLAGS=`$APXS -q CFLAGS`
41-
APXS_MPM=`$APXS -q MPM_NAME`
4241
APU_BINDIR=`$APXS -q APU_BINDIR`
4342
APR_BINDIR=`$APXS -q APR_BINDIR`
4443

@@ -117,8 +116,16 @@ if test "$PHP_APXS2" != "no"; then
117116
;;
118117
esac
119118

120-
if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
121-
PHP_BUILD_THREAD_SAFE
119+
if test "$APACHE_VERSION" -lt 2004001; then
120+
APXS_MPM=`$APXS -q MPM_NAME`
121+
if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
122+
PHP_BUILD_THREAD_SAFE
123+
fi
124+
else
125+
APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
126+
if test -n "$APACHE_THREADED_MPM"; then
127+
PHP_BUILD_THREAD_SAFE
128+
fi
122129
fi
123130
AC_MSG_RESULT(yes)
124131
PHP_SUBST(APXS)

0 commit comments

Comments
 (0)