-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbug61172.patch
89 lines (83 loc) · 3 KB
/
bug61172.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Index: sapi/apache2handler/config.m4
===================================================================
--- sapi/apache2handler/config.m4 (revision 323592)
+++ sapi/apache2handler/config.m4 (working copy)
@@ -38,7 +38,6 @@
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 @@
;;
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)
Index: sapi/apache2filter/config.m4
===================================================================
--- sapi/apache2filter/config.m4 (revision 323592)
+++ sapi/apache2filter/config.m4 (working copy)
@@ -39,7 +39,6 @@
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 @@
;;
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: configure.in
===================================================================
--- configure.in (revision 323592)
+++ configure.in (working copy)
@@ -1550,6 +1550,21 @@
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