]> git.pld-linux.org Git - packages/php4.git/blame - php4-apache24.patch
- x32 fixes
[packages/php4.git] / php4-apache24.patch
CommitLineData
36240886
AM
1diff -ur -x configure -x aclocal.m4 -x config.guess -x config.sub -x '*.orig' -x install-sh -x ltmain.sh -x php_config.h.in php-4.4.9.org/acinclude.m4 php-4.4.9.changed/acinclude.m4
2--- php-4.4.9.org/acinclude.m4 2013-10-07 13:35:57.560042156 +0200
3+++ php-4.4.9.changed/acinclude.m4 2013-10-07 13:35:39.659624293 +0200
4@@ -2007,6 +2007,10 @@
5 ac_output=`$1 -v 2>&1`
6 fi
7
8+ if test -n "$FORCE_APACHE_VERSION"; then
9+ ac_output="Server version: Apache/${FORCE_APACHE_VERSION} (PLD/Linux)"
10+ fi
11+
12 ac_IFS=$IFS
13 IFS="- /.
14 "
15diff -ur -x configure -x aclocal.m4 -x config.guess -x config.sub -x '*.orig' -x install-sh -x ltmain.sh -x php_config.h.in php-4.4.9.org/configure.in php-4.4.9.changed/configure.in
16--- php-4.4.9.org/configure.in 2013-10-07 13:35:57.586709445 +0200
17+++ php-4.4.9.changed/configure.in 2013-10-07 13:34:26.551250929 +0200
18@@ -1421,6 +1421,21 @@
19 X
20 fi
21
22+ if test "$PHP_SAPI" = "apache2handler" || test "$PHP_SAPI" = "apache2filter"; then
23+ if test "$APACHE_VERSION" -ge 2004001; then
24+ if test -z "$APACHE_THREADED_MPM"; then
25+cat <<X
26++--------------------------------------------------------------------+
27+| *** WARNING *** |
28+| |
29+| You have built PHP for Apache's current non-threaded MPM. |
30+| If you change Apache to use a threaded MPM you must reconfigure |
31+| PHP with --enable-maintainer-zts |
32+X
33+ fi
34+ fi
35+ fi
36+
37 # Warn about linking Apache with libpthread if oci8 extension is enabled on linux.
38 if test "$PHP_OCI8" != "no" -o "$PHP_ORACLE" != "no"; then
39 if test "$PHP_SAPI" = "apache"; then
40diff -ur -x configure -x aclocal.m4 -x config.guess -x config.sub -x '*.orig' -x install-sh -x ltmain.sh -x php_config.h.in php-4.4.9.org/sapi/apache2filter/config.m4 php-4.4.9.changed/sapi/apache2filter/config.m4
41--- php-4.4.9.org/sapi/apache2filter/config.m4 2004-12-17 00:14:28.000000000 +0100
42+++ php-4.4.9.changed/sapi/apache2filter/config.m4 2013-10-07 13:34:26.551250929 +0200
43@@ -36,7 +36,6 @@
44 APXS_BINDIR=`$APXS -q BINDIR`
45 APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
46 APXS_CFLAGS=`$APXS -q CFLAGS`
47- APXS_MPM=`$APXS -q MPM_NAME`
48 APU_BINDIR=`$APXS -q APU_BINDIR`
49 APR_BINDIR=`$APXS -q APR_BINDIR`
50
51@@ -115,8 +114,16 @@
52 ;;
53 esac
54
55- if test "$APXS_MPM" != "prefork"; then
56- PHP_BUILD_THREAD_SAFE
57+ if test "$APACHE_VERSION" -lt 2004001; then
58+ APXS_MPM=`$APXS -q MPM_NAME`
59+ if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
60+ PHP_BUILD_THREAD_SAFE
61+ fi
62+ else
63+ APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
64+ if test -n "$APACHE_THREADED_MPM"; then
65+ PHP_BUILD_THREAD_SAFE
66+ fi
67 fi
68 AC_MSG_RESULT(yes)
69
70diff -ur -x configure -x aclocal.m4 -x config.guess -x config.sub -x '*.orig' -x install-sh -x ltmain.sh -x php_config.h.in php-4.4.9.org/sapi/apache2handler/config.m4 php-4.4.9.changed/sapi/apache2handler/config.m4
71--- php-4.4.9.org/sapi/apache2handler/config.m4 2013-10-07 13:35:57.520041222 +0200
72+++ php-4.4.9.changed/sapi/apache2handler/config.m4 2013-10-07 13:34:26.551250929 +0200
73@@ -35,7 +35,6 @@
74 APXS_BINDIR=`$APXS -q BINDIR`
75 APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
76 APXS_CFLAGS=`$APXS -q CFLAGS`
77- APXS_MPM=`$APXS -q MPM_NAME`
78 APU_BINDIR=`$APXS -q APU_BINDIR`
79 APR_BINDIR=`$APXS -q APR_BINDIR`
80
32192ed5 81@@ -114,8 +114,16 @@
36240886
AM
82 ;;
83 esac
84
85- if test "$APXS_MPM" != "prefork"; then
86- PHP_BUILD_THREAD_SAFE
87+ if test "$APACHE_VERSION" -lt 2004001; then
88+ APXS_MPM=`$APXS -q MPM_NAME`
89+ if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
90+ PHP_BUILD_THREAD_SAFE
91+ fi
92+ else
93+ APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
94+ if test -n "$APACHE_THREADED_MPM"; then
95+ PHP_BUILD_THREAD_SAFE
96+ fi
97 fi
98 AC_MSG_RESULT(yes)
32192ed5 99
3af3d04d
AM
100--- php-4.4.9/sapi.org/apache2handler/php_functions.c 2007-12-31 08:22:55.000000000 +0100
101+++ php-4.4.9/sapi/apache2handler/php_functions.c 2014-08-11 13:09:01.932246720 +0200
102@@ -324,7 +324,11 @@
103
104 static char *php_apache_get_version()
105 {
106+#if MODULE_MAGIC_NUMBER_MAJOR >= 20060905
107+ return (char *) ap_get_server_banner();
108+#else
109 return (char *) ap_get_server_version();
110+#endif
111 }
112
113 /* {{{ proto string apache_get_version(void)
547f3929
AM
114@@ -373,9 +373,13 @@
115 int n, max_requests;
116 char *p;
117 server_rec *serv = ((php_struct *) SG(server_context))->r->server;
118-#if !defined(WIN32) && !defined(WINNT)
119+#if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE)
120+#if MODULE_MAGIC_NUMBER_MAJOR >= 20081201
121+ AP_DECLARE_DATA extern unixd_config_rec ap_unixd_config;
122+#else
123 AP_DECLARE_DATA extern unixd_config_rec unixd_config;
124 #endif
125+#endif
126
127 for (n = 0; ap_loaded_modules[n]; ++n) {
128 char *s = (char *) ap_loaded_modules[n]->name;
c84d73b0
AM
129@@ -407,9 +407,13 @@
130
131 snprintf(tmp, sizeof(tmp), "%s:%u", serv->server_hostname, serv->port);
132 php_info_print_table_row(2, "Hostname:Port", tmp);
133-
134-#if !defined(WIN32) && !defined(WINNT)
135+
136+#if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE)
137+#if MODULE_MAGIC_NUMBER_MAJOR >= 20081201
138+ snprintf(tmp, sizeof(tmp), "%s(%d)/%d", ap_unixd_config.user_name, ap_unixd_config.user_id, ap_unixd_config.group_id);
139+#else
140 snprintf(tmp, sizeof(tmp), "%s(%d)/%d", unixd_config.user_name, unixd_config.user_id, unixd_config.group_id);
141+#endif
142 php_info_print_table_row(2, "User/Group", tmp);
143 #endif
144
This page took 0.041225 seconds and 4 git commands to generate.