Skip to content

Commit

Permalink
Fixed bug #61172 (Add Apache 2.4 support)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbj committed Mar 2, 2012
1 parent 4fff475 commit 949ef40
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ PHP NEWS
(rui, Gustavo)
. Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry)

- Installation
. Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)

- Fileinfo
. Fixed bug #61173 (Unable to detect error from finfo constructor). (Gustavo)

Expand Down
15 changes: 15 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,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
Expand Down
13 changes: 10 additions & 3 deletions sapi/apache2filter/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down Expand Up @@ -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)
Expand Down
13 changes: 10 additions & 3 deletions sapi/apache2handler/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 949ef40

Please sign in to comment.