summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-09-17 10:00:47 +0200
committerRemi Collet <fedora@famillecollet.com>2014-09-17 10:00:47 +0200
commit4bd1d7bec6f4cfde5d687791bda7f6ee2da21bb3 (patch)
treee41331387cc6e2b2ef64ef47cf094722ec8ede85
parentecc16d8af29c2f1b67f30734c791aa1f811390cd (diff)
PHP 5.5.17
-rw-r--r--php-5.2.0-includedir.patch2
-rw-r--r--php-bug65641.patch63
-rw-r--r--php.spec11
3 files changed, 74 insertions, 2 deletions
diff --git a/php-5.2.0-includedir.patch b/php-5.2.0-includedir.patch
index a1c3afe..ac4ae4a 100644
--- a/php-5.2.0-includedir.patch
+++ b/php-5.2.0-includedir.patch
@@ -5,7 +5,7 @@
EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"`
EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"`
-INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR
-+INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR:${EXPANDED_DATADIR}/php
++INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR:${EXPANDED_DATADIR}/php:/usr/share/pear:/usr/share/php
exec_prefix=$old_exec_prefix
libdir=$old_libdir
diff --git a/php-bug65641.patch b/php-bug65641.patch
new file mode 100644
index 0000000..d9b31d1
--- /dev/null
+++ b/php-bug65641.patch
@@ -0,0 +1,63 @@
+From 8cac75969e5abb2b6be5bbd489d851a4f9e50979 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Mon, 15 Sep 2014 13:29:55 +0200
+Subject: [PATCH] Fixed bug #65641 PHP-FPM incorrectly defines the SCRIPT_NAME
+ variable when using Apache
+
+ProxyPass is unable to provide correct PATH_INFO
+as it is not aware of file path (while SetHandler is).
+
+As we can extract PATH_INFO from PATH_TRANSLATED,
+we also need to check if present in SCRIPT_NAME
+and remove it.
+
+After applying this patch.
+With mod_php
+_SERVER["REQUEST_URI"] /info.php/foo/bar?q=1
+_SERVER["SCRIPT_NAME"] /info.php
+_SERVER["PATH_INFO"] /foor/bar
+_SERVER["PHP_SELF"] /info.php/foo/bar
+_SERVER["QUERY_STRING"] q=1
+
+With mod_proxy_fcgi + SetHandler
+_SERVER["REQUEST_URI"] /info.php/foo/bar?q=1
+_SERVER["SCRIPT_NAME"] /info.php
+_SERVER["PATH_INFO"] /foo/bar
+_SERVER["PHP_SELF"] /info.php/foo/bar
+_SERVER["QUERY_STRING"] q=1
+
+With mod_proxy_fcgi + ProxyPass
+_SERVER["REQUEST_URI"] /info.php/foo/bar?q=1
+_SERVER["SCRIPT_NAME"] /info.php
+_SERVER["PATH_INFO"] /foo/bar
+_SERVER["PHP_SELF"] /info.php/foo/bar
+_SERVER["QUERY_STRING"] q=1
+---
+ sapi/fpm/fpm/fpm_main.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
+index 56a06f9..331342c 100644
+--- a/sapi/fpm/fpm/fpm_main.c
++++ b/sapi/fpm/fpm/fpm_main.c
+@@ -1231,6 +1231,17 @@ static void init_request_info(TSRMLS_D)
+ SG(request_info).request_uri = orig_script_name;
+ }
+ path_info[0] = old;
++ } else if (apache_was_here && env_script_name) {
++ /* Using mod_proxy_fcgi and ProxyPass, apache cannot set PATH_INFO
++ * As we can extract PATH_INFO from PATH_TRANSLATED
++ * it is probably also in SCRIPT_NAME and need to be removed
++ */
++ int snlen = strlen(env_script_name);
++ if (snlen>slen && !strcmp(env_script_name+snlen-slen, path_info)) {
++ _sapi_cgibin_putenv("ORIG_SCRIPT_NAME", orig_script_name TSRMLS_CC);
++ env_script_name[snlen-slen] = 0;
++ SG(request_info).request_uri = _sapi_cgibin_putenv("SCRIPT_NAME", env_script_name TSRMLS_CC);
++ }
+ }
+ env_path_info = _sapi_cgibin_putenv("PATH_INFO", path_info TSRMLS_CC);
+ }
+--
+1.9.2
+
diff --git a/php.spec b/php.spec
index fa1306a..c138a37 100644
--- a/php.spec
+++ b/php.spec
@@ -126,7 +126,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: %{?scl_prefix}php
-Version: 5.5.16
+Version: 5.5.17
Release: 1%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
@@ -177,6 +177,7 @@ Patch47: php-5.4.9-phpinfo.patch
Patch91: php-5.3.7-oci8conf.patch
# Upstream fixes (100+)
+Patch100: php-bug65641.patch
# Security fixes (200+)
@@ -839,6 +840,7 @@ support for using the enchant library to PHP.
%patch91 -p1 -b .remi-oci8
# upstream patches
+%patch100 -p1 -b .bug65641
# security patches
@@ -1685,6 +1687,13 @@ fi
%changelog
+* Wed Sep 17 2014 Remi Collet <remi@fedoraproject.org> 5.5.17-1
+- Update to 5.5.17
+ http://www.php.net/releases/5_5_17.php
+- fpm: fix script_name with mod_proxy_fcgi / proxypass
+ add upstream patch for https://bugs.php.net/65641
+- add system php library to default include_path
+
* Wed Sep 3 2014 Remi Collet <rcollet@redhat.com> - 5.5.16-1
- update to 5.5.16
- cleanup, merge with spec from remi repository