[packages/php/PHP_5_2] Rediff patches.

arekm arekm at pld-linux.org
Sat Oct 23 19:17:37 CEST 2021


commit f9fed404a21127d54adeafb03c9eea71f3ed9301
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Oct 23 19:16:33 2021 +0200

    Rediff patches.

 bug-47930.patch                 |  80 ++----
 bug-60986.patch                 |  45 ++-
 mysqli-err.patch                |  13 +-
 php-acam.patch                  |  13 +-
 php-both-apxs.patch             |   9 +-
 php-builddir.patch              |  14 +-
 php-config-dir.patch            |  17 +-
 php-curl-limit-speed.patch      |  17 +-
 php-fcgi-graceful.patch         |  17 +-
 php-fpm.patch                   | 618 ++++++++++++++--------------------------
 php-m4-divert.patch             |  36 +--
 php-mail.patch                  |  15 +-
 php-mysql-charsetphpini.patch   |  30 +-
 php-mysqli-charsetphpini.patch  |  66 +++--
 php-no-metaccld.patch           |  13 +-
 php-pldlogo.patch               |  38 +--
 php-secbug-67498.patch          |  19 +-
 php-shared.patch                |  59 ++--
 php-uint32_t.patch              |  13 +-
 php-zlib-for-getimagesize.patch |  13 +-
 php.spec                        |   8 +-
 suhosin.patch                   | 436 ++++++++++++++--------------
 22 files changed, 693 insertions(+), 896 deletions(-)
---
diff --git a/php.spec b/php.spec
index 3cae655..ac3dc50 100644
--- a/php.spec
+++ b/php.spec
@@ -1936,7 +1936,7 @@ done
 
 # mysql default charset for mysql/mysql/pdo-mysql extensions
 %patch36 -p1
-%patch37 -p0
+%patch37 -p1
 %patch38 -p0
 
 %patch39 -p1
@@ -1966,10 +1966,10 @@ done
 %patch57 -p1
 %patch58 -p4
 %patch59 -p1
-%patch60 -p4
+%patch60 -p1
 %patch61 -p1
 %{?with_system_libzip:%patch65 -p1}
-%patch66 -p2
+%patch66 -p1
 %patch67 -p1
 %patch69 -p4
 %patch70 -p1
@@ -2468,7 +2468,7 @@ for fn in ltmain.sh config/ltmain.sh build-aux/ltmain.sh; do
 done
 sed -i -e '/^phpdir/ s,/php/build,/%{name}/build,' $RPM_BUILD_ROOT%{_bindir}/phpize
 
-# as a result of ext/pcre/pcrelib removal in %%prep, ext/pcre/php_pcre.h
+# as a result of ext/pcre/pcrelib removal in prep, ext/pcre/php_pcre.h
 # isn't installed by install-headers make target, we do it manually here.
 # this header file is required by e.g. filter PECL extension
 install -D ext/pcre/php_pcre.h $RPM_BUILD_ROOT%{_includedir}/php/ext/pcre/php_pcre.h
diff --git a/bug-47930.patch b/bug-47930.patch
index 0408e90..1c3a3e0 100644
--- a/bug-47930.patch
+++ b/bug-47930.patch
@@ -25,17 +25,18 @@ https://bugs.php.net/bug.php?id=47930
 This patch backports it.
 Index: branches/PHP_5_3/ext/filter/filter.c
 ===================================================================
---- branches/PHP_5_3/ext/filter/filter.c	(revision 279521)
-+++ branches/PHP_5_3/ext/filter/filter.c	(revision 279522)
-@@ -76,6 +76,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/filter/filter.c php-5.2.17/ext/filter/filter.c
+--- php-5.2.17.org/ext/filter/filter.c	2021-10-23 19:13:24.436458386 +0200
++++ php-5.2.17/ext/filter/filter.c	2021-10-23 19:13:27.149791720 +0200
+@@ -76,6 +76,7 @@ filter_list_entry filter_list[] = {
  #endif
  
  static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC);
 +static unsigned int php_sapi_filter_init(TSRMLS_D);
  
- /* {{{ arginfo */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_input, 0, 0, 2)
-@@ -270,7 +271,7 @@
+ /* {{{ filter_functions[]
+  */
+@@ -233,7 +234,7 @@ PHP_MINIT_FUNCTION(filter)
  	REGISTER_LONG_CONSTANT("FILTER_FLAG_NO_RES_RANGE", FILTER_FLAG_NO_RES_RANGE, CONST_CS | CONST_PERSISTENT);
  	REGISTER_LONG_CONSTANT("FILTER_FLAG_NO_PRIV_RANGE", FILTER_FLAG_NO_PRIV_RANGE, CONST_CS | CONST_PERSISTENT);
  
@@ -44,7 +45,7 @@ Index: branches/PHP_5_3/ext/filter/filter.c
  
  	return SUCCESS;
  }
-@@ -339,6 +340,17 @@
+@@ -302,6 +303,17 @@ static filter_list_entry php_find_filter
  }
  /* }}} */
  
@@ -62,19 +63,10 @@ Index: branches/PHP_5_3/ext/filter/filter.c
  static void php_zval_filter(zval **value, long filter, long flags, zval *options, char* charset, zend_bool copy TSRMLS_DC) /* {{{ */
  {
  	filter_list_entry  filter_func;
-
-Property changes on: branches/PHP_5_3/ext/filter/filter.c
-___________________________________________________________________
-Modified: cvs2svn:cvs-rev
-## -1 +1 ##
--1.52.2.39.2.15
-+1.52.2.39.2.16
-\ No newline at end of property
-Index: branches/PHP_5_3/main/SAPI.c
-===================================================================
---- branches/PHP_5_3/main/SAPI.c	(revision 279521)
-+++ branches/PHP_5_3/main/SAPI.c	(revision 279522)
-@@ -326,6 +326,9 @@
+diff -urNp -x '*.orig' php-5.2.17.org/main/SAPI.c php-5.2.17/main/SAPI.c
+--- php-5.2.17.org/main/SAPI.c	2021-10-23 19:13:24.446458386 +0200
++++ php-5.2.17/main/SAPI.c	2021-10-23 19:13:27.149791720 +0200
+@@ -323,6 +323,9 @@ SAPI_API void sapi_activate_headers_only
  			sapi_module.activate(TSRMLS_C);
  		}
  	}
@@ -84,7 +76,7 @@ Index: branches/PHP_5_3/main/SAPI.c
  }
  
  /*
-@@ -392,6 +395,9 @@
+@@ -389,6 +392,9 @@ SAPI_API void sapi_activate(TSRMLS_D)
  			sapi_module.activate(TSRMLS_C);
  		}
  	}
@@ -94,7 +86,7 @@ Index: branches/PHP_5_3/main/SAPI.c
  }
  
  
-@@ -925,13 +931,14 @@
+@@ -884,13 +890,14 @@ SAPI_API int sapi_register_treat_data(vo
  	return SUCCESS;
  }
  
@@ -110,19 +102,10 @@ Index: branches/PHP_5_3/main/SAPI.c
  	return SUCCESS;
  }
  
-
-Property changes on: branches/PHP_5_3/main/SAPI.c
-___________________________________________________________________
-Modified: cvs2svn:cvs-rev
-## -1 +1 ##
--1.202.2.7.2.15.2.6
-+1.202.2.7.2.15.2.7
-\ No newline at end of property
-Index: branches/PHP_5_3/main/SAPI.h
-===================================================================
---- branches/PHP_5_3/main/SAPI.h	(revision 279521)
-+++ branches/PHP_5_3/main/SAPI.h	(revision 279522)
-@@ -192,7 +192,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/main/SAPI.h php-5.2.17/main/SAPI.h
+--- php-5.2.17.org/main/SAPI.h	2010-03-18 23:37:25.000000000 +0100
++++ php-5.2.17/main/SAPI.h	2021-10-23 19:13:27.149791720 +0200
+@@ -188,7 +188,7 @@ SAPI_API int sapi_register_post_entry(sa
  SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry TSRMLS_DC);
  SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D));
  SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zval *destArray TSRMLS_DC));
@@ -131,7 +114,7 @@ Index: branches/PHP_5_3/main/SAPI.h
  
  SAPI_API int sapi_flush(TSRMLS_D);
  SAPI_API struct stat *sapi_get_stat(TSRMLS_D);
-@@ -259,6 +259,7 @@
+@@ -259,6 +259,7 @@ struct _sapi_module_struct {
  	int phpinfo_as_text;
  
  	char *ini_entries;
@@ -139,19 +122,10 @@ Index: branches/PHP_5_3/main/SAPI.h
  };
  
  
-
-Property changes on: branches/PHP_5_3/main/SAPI.h
-___________________________________________________________________
-Modified: cvs2svn:cvs-rev
-## -1 +1 ##
--1.114.2.1.2.3.2.7
-+1.114.2.1.2.3.2.8
-\ No newline at end of property
-Index: branches/PHP_5_3/main/php_content_types.c
-===================================================================
---- branches/PHP_5_3/main/php_content_types.c	(revision 279521)
-+++ branches/PHP_5_3/main/php_content_types.c	(revision 279522)
-@@ -75,7 +75,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/main/php_content_types.c php-5.2.17/main/php_content_types.c
+--- php-5.2.17.org/main/php_content_types.c	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/main/php_content_types.c	2021-10-23 19:13:27.149791720 +0200
+@@ -75,7 +75,7 @@ int php_startup_sapi_content_types(TSRML
  {
  	sapi_register_default_post_reader(php_default_post_reader);
  	sapi_register_treat_data(php_default_treat_data);
@@ -160,11 +134,3 @@ Index: branches/PHP_5_3/main/php_content_types.c
  	return SUCCESS;
  }
  /* }}} */
-
-Property changes on: branches/PHP_5_3/main/php_content_types.c
-___________________________________________________________________
-Modified: cvs2svn:cvs-rev
-## -1 +1 ##
--1.32.2.1.2.4.2.2
-+1.32.2.1.2.4.2.3
-\ No newline at end of property
diff --git a/bug-60986.patch b/bug-60986.patch
index f29c317..fb4c4e0 100644
--- a/bug-60986.patch
+++ b/bug-60986.patch
@@ -1,7 +1,16 @@
---- php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.c	2012/02/06 17:57:47	323095
-+++ php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.c	2012/02/06 18:11:56	323096
-@@ -252,10 +252,10 @@
- 	   back the compiled pattern, otherwise go on and compile it. */
+diff -urNp -x '*.orig' php-5.2.17.org/ext/pcre/php_pcre.c php-5.2.17/ext/pcre/php_pcre.c
+--- php-5.2.17.org/ext/pcre/php_pcre.c	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/ext/pcre/php_pcre.c	2021-10-23 19:12:03.406458393 +0200
+@@ -241,6 +241,7 @@ PHPAPI pcre_cache_entry* pcre_get_compil
+ 	char				*pattern;
+ 	int					 do_study = 0;
+ 	int					 poptions = 0;
++	int				count = 0;
+ 	unsigned const char *tables = NULL;
+ #if HAVE_SETLOCALE
+ 	char				*locale = setlocale(LC_CTYPE, NULL);
+@@ -253,10 +254,10 @@ PHPAPI pcre_cache_entry* pcre_get_compil
+ 	regex_len = strlen(regex);
  	if (zend_hash_find(&PCRE_G(pcre_cache), regex, regex_len+1, (void **)&pce) == SUCCESS) {
  		/*
 -		 * We use a quick pcre_info() check to see whether cache is corrupted, and if it
@@ -9,13 +18,14 @@
  		 * is, we flush it and compile the pattern from scratch.
  		 */
 -		if (pcre_info(pce->re, NULL, NULL) == PCRE_ERROR_BADMAGIC) {
-+		if (pcre_fullinfo(pce->re, NULL, NULL, NULL) == PCRE_ERROR_BADMAGIC) {
++		if (pcre_fullinfo(pce->re, NULL, PCRE_INFO_CAPTURECOUNT, &count) == PCRE_ERROR_BADMAGIC) {
  			zend_hash_clean(&PCRE_G(pcre_cache));
  		} else {
  #if HAVE_SETLOCALE
---- php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.def	2012/02/06 17:57:47	323095
-+++ php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.def	2012/02/06 18:11:56	323096
-@@ -4,7 +4,6 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/pcre/php_pcre.def php-5.2.17/ext/pcre/php_pcre.def
+--- php-5.2.17.org/ext/pcre/php_pcre.def	2007-02-26 13:38:34.000000000 +0100
++++ php-5.2.17/ext/pcre/php_pcre.def	2021-10-23 19:12:03.406458393 +0200
+@@ -4,7 +4,6 @@ php_pcre_copy_substring
  php_pcre_exec
  php_pcre_get_substring
  php_pcre_get_substring_list
@@ -23,22 +33,3 @@
  php_pcre_maketables
  php_pcre_study
  php_pcre_version
---- php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.c	2012/02/06 18:11:56	323096
-+++ php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.c	2012/02/06 18:18:53	323097
-@@ -241,6 +241,7 @@
- 	char				*pattern;
- 	int					 do_study = 0;
- 	int					 poptions = 0;
-+	int				count = 0;
- 	unsigned const char *tables = NULL;
- #if HAVE_SETLOCALE
- 	char				*locale = setlocale(LC_CTYPE, NULL);
-@@ -255,7 +256,7 @@
- 		 * We use a quick pcre_fullinfo() check to see whether cache is corrupted, and if it
- 		 * is, we flush it and compile the pattern from scratch.
- 		 */
--		if (pcre_fullinfo(pce->re, NULL, NULL, NULL) == PCRE_ERROR_BADMAGIC) {
-+		if (pcre_fullinfo(pce->re, NULL, PCRE_INFO_CAPTURECOUNT, &count) == PCRE_ERROR_BADMAGIC) {
- 			zend_hash_clean(&PCRE_G(pcre_cache));
- 		} else {
- #if HAVE_SETLOCALE
diff --git a/mysqli-err.patch b/mysqli-err.patch
index 2987463..d4fba21 100644
--- a/mysqli-err.patch
+++ b/mysqli-err.patch
@@ -1,6 +1,7 @@
---- php-5.4.45/ext/mysqli/mysqli.c.orig	2018-03-20 20:56:38.000000000 +0100
-+++ php-5.4.45/ext/mysqli/mysqli.c	2018-03-20 21:15:42.030265770 +0100
-@@ -1376,7 +1376,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/mysqli/mysqli.c php-5.2.17/ext/mysqli/mysqli.c
+--- php-5.2.17.org/ext/mysqli/mysqli.c	2021-10-23 19:15:35.113125046 +0200
++++ php-5.2.17/ext/mysqli/mysqli.c	2021-10-23 19:15:37.713125046 +0200
+@@ -1063,7 +1063,7 @@ int php_local_infile_init(void **ptr, co
  	}
  
  	if (!(mysql = (MY_MYSQL *)userdata)) {
@@ -9,8 +10,8 @@
  		return 1;
  	}
  
-@@ -1423,7 +1423,7 @@
- 		int count = (int)php_stream_read(mysql->li_stream, buf, buf_len);
+@@ -1112,7 +1112,7 @@ int php_local_infile_read(void *ptr, cha
+ 		count = (int)php_stream_read(mysql->li_stream, buf, buf_len);
  
  		if (count < 0) {
 -			LOCAL_INFILE_ERROR_MSG(data->error_msg, ER(2));
@@ -18,7 +19,7 @@
  		}
  
  		return count;
-@@ -1499,7 +1499,7 @@
+@@ -1174,7 +1174,7 @@ int php_local_infile_error(void *ptr, ch
  		strlcpy(error_msg, data->error_msg, error_msg_len);
  		return 2000;
  	} 
diff --git a/php-acam.patch b/php-acam.patch
index 5369ac7..1f8b16b 100644
--- a/php-acam.patch
+++ b/php-acam.patch
@@ -1,10 +1,11 @@
---- php-4.2.2/ext/mysql/config.m4.orig	Fri Aug  9 23:49:00 2002
-+++ php-4.2.2/ext/mysql/config.m4	Sat Aug 10 00:05:40 2002
-@@ -49,6 +49,7 @@
- [  --with-mysql[=DIR]      Include MySQL support. DIR is the MySQL base directory.
-                           If unspecified, the bundled MySQL library will be used.], yes)
+diff -urNp -x '*.orig' php-5.2.17.org/ext/mysql/config.m4 php-5.2.17/ext/mysql/config.m4
+--- php-5.2.17.org/ext/mysql/config.m4	2006-06-01 21:14:48.000000000 +0200
++++ php-5.2.17/ext/mysql/config.m4	2021-10-23 18:59:19.959791807 +0200
+@@ -52,6 +52,7 @@ if test -z "$PHP_ZLIB_DIR"; then
+ fi
+ 
  
 +PHP_REQUIRE_CXX
  if test "$PHP_MYSQL" != "no"; then
    AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
-   if test "$PHP_SAFE_MODE" = "yes"; then
+ 
diff --git a/php-both-apxs.patch b/php-both-apxs.patch
index 8e7bd89..70f6391 100644
--- a/php-both-apxs.patch
+++ b/php-both-apxs.patch
@@ -1,7 +1,8 @@
---- php-5.2.4/Makefile.global~	2007-08-31 19:35:54.000000000 +0300
-+++ php-5.2.4/Makefile.global	2007-08-31 19:40:18.287528480 +0300
-@@ -21,6 +21,12 @@
- 	$(LIBTOOL) --mode=link $(CC) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(phptempdir)/libphp_common.la $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
+diff -urNp -x '*.orig' php-5.2.17.org/Makefile.global php-5.2.17/Makefile.global
+--- php-5.2.17.org/Makefile.global	2021-10-23 19:00:48.126458465 +0200
++++ php-5.2.17/Makefile.global	2021-10-23 19:00:50.556458465 +0200
+@@ -21,6 +21,12 @@ libphp$(PHP_MAJOR_VERSION).la: libphp_co
+ 	$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(phptempdir)/libphp_common.la $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
  	-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
  
 +$(LIBTOOL_SAPI): libphp_common.la $(PHP_SAPI_OBJS)
diff --git a/php-builddir.patch b/php-builddir.patch
index 783dc2b..8b48c4d 100644
--- a/php-builddir.patch
+++ b/php-builddir.patch
@@ -1,6 +1,6 @@
-diff -urbB php-5.0.5.org/scripts/Makefile.frag php-5.0.5/scripts/Makefile.frag
---- php-5.0.5.org/scripts/Makefile.frag	2005-09-10 21:29:04.884122000 +0200
-+++ php-5.0.5/scripts/Makefile.frag	2005-09-10 21:30:09.333324848 +0200
+diff -urNp -x '*.orig' php-5.2.17.org/scripts/Makefile.frag php-5.2.17/scripts/Makefile.frag
+--- php-5.2.17.org/scripts/Makefile.frag	2010-07-13 19:24:44.000000000 +0200
++++ php-5.2.17/scripts/Makefile.frag	2021-10-23 19:01:40.383125127 +0200
 @@ -4,7 +4,7 @@
  #
  
@@ -10,9 +10,9 @@ diff -urbB php-5.0.5.org/scripts/Makefile.frag php-5.0.5/scripts/Makefile.frag
  
  BUILD_FILES = \
  	scripts/phpize.m4 \
-diff -urbB php-5.0.5.org/scripts/phpize.in php-5.0.5/scripts/phpize.in
---- php-5.0.5.org/scripts/phpize.in	2005-06-15 19:19:41.000000000 +0200
-+++ php-5.0.5/scripts/phpize.in	2005-09-10 21:51:45.523274024 +0200
+diff -urNp -x '*.orig' php-5.2.17.org/scripts/phpize.in php-5.2.17/scripts/phpize.in
+--- php-5.2.17.org/scripts/phpize.in	2009-06-24 09:43:18.000000000 +0200
++++ php-5.2.17/scripts/phpize.in	2021-10-23 19:01:40.383125127 +0200
 @@ -3,7 +3,7 @@
  # Variable declaration
  prefix='@prefix@'
@@ -21,4 +21,4 @@ diff -urbB php-5.0.5.org/scripts/phpize.in php-5.0.5/scripts/phpize.in
 +phpdir="`eval echo @libdir@`/php/build"
  includedir="`eval echo @includedir@`/php"
  builddir="`pwd`"
- 
+ SED="@SED@"
diff --git a/php-config-dir.patch b/php-config-dir.patch
index b6abad5..f47d734 100644
--- a/php-config-dir.patch
+++ b/php-config-dir.patch
@@ -1,14 +1,15 @@
---- php-5.2.0/scripts/php-config.in	2006-12-14 01:11:33.348180526 +0200
-+++ php-5.2.4/scripts/php-config.in	2007-08-31 19:43:04.061307670 +0300
-@@ -2,6 +2,7 @@
- 
+diff -urNp -x '*.orig' php-5.2.17.org/scripts/php-config.in php-5.2.17/scripts/php-config.in
+--- php-5.2.17.org/scripts/php-config.in	2007-08-24 13:44:10.000000000 +0200
++++ php-5.2.17/scripts/php-config.in	2021-10-23 19:04:25.856458437 +0200
+@@ -3,6 +3,7 @@
+ SED="@SED@"
  prefix="@prefix@"
  exec_prefix="@exec_prefix@"
 +sysconfdir='@sysconfdir@'
  version="@PHP_VERSION@"
- version_id="@PHP_VERSION_ID@"
- includedir="@includedir@/php"
-@@ -53,6 +54,8 @@
+ vernum="@PHP_VERSION_ID@"
+ include_dir="@includedir@/php"
+@@ -53,6 +54,8 @@ case "$1" in
    echo $extension_dir;;
  --include-dir)
    echo $include_dir;;
@@ -17,7 +18,7 @@
  --php-binary)
    echo $php_binary;;
  --php-sapis)
-@@ -72,6 +75,7 @@
+@@ -72,6 +75,7 @@ Options:
    --ldflags           [$ldflags]
    --libs              [$libs]
    --extension-dir     [$extension_dir]
diff --git a/php-curl-limit-speed.patch b/php-curl-limit-speed.patch
index 8348dd4..7d13364 100644
--- a/php-curl-limit-speed.patch
+++ b/php-curl-limit-speed.patch
@@ -1,6 +1,7 @@
---- php-5.2.5.orig/ext/curl/interface.c	2008-03-26 17:05:19.000000000 +0100
-+++ php-5.2.5/ext/curl/interface.c	2008-03-26 17:09:05.000000000 +0100
-@@ -462,6 +462,14 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/curl/interface.c php-5.2.17/ext/curl/interface.c
+--- php-5.2.17.org/ext/curl/interface.c	2021-10-23 19:05:53.836458431 +0200
++++ php-5.2.17/ext/curl/interface.c	2021-10-23 19:05:56.283125097 +0200
+@@ -481,6 +481,14 @@ PHP_MINIT_FUNCTION(curl)
  	REGISTER_CURL_CONSTANT(CURLOPT_TCP_NODELAY);
  #endif
  	REGISTER_CURL_CONSTANT(CURLOPT_HTTP200ALIASES);
@@ -15,9 +16,9 @@
  	REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
  	REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
  	REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
-@@ -1288,6 +1296,12 @@
- #if LIBCURL_VERSION_NUM > 0x070b01 /* CURLOPT_TCP_NODELAY is available since curl 7.11.2 */
- 		case CURLOPT_TCP_NODELAY:
+@@ -1371,6 +1379,12 @@ static int _php_curl_setopt(php_curl *ch
+ 		case CURLOPT_REDIR_PROTOCOLS:
+ 		case CURLOPT_PROTOCOLS:
  #endif
 +/* Added case options to support limiting the transfer speed in PHP */
 +/* Fixed by Tijnema (admin at tijnema.info) */
@@ -26,5 +27,5 @@
 +		case CURLOPT_MAX_RECV_SPEED_LARGE:
 +#endif
  			convert_to_long_ex(zvalue);
- 			error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
- 			break;
+ #if LIBCURL_VERSION_NUM >= 0x71304
+ 			if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) &&
diff --git a/php-fcgi-graceful.patch b/php-fcgi-graceful.patch
index 1f25713..690a88e 100644
--- a/php-fcgi-graceful.patch
+++ b/php-fcgi-graceful.patch
@@ -17,11 +17,12 @@ while ($i < 35) {
 echo "end!<br>\n";
 ?>
 
---- php-5.2.5RC2/sapi/cgi/cgi_main.c	2007-11-01 17:23:14.000000000 +0200
-+++ php-5.2.5RC2-graceful/sapi/cgi/cgi_main.c	2007-11-08 00:46:38.999355875 +0200
-@@ -103,6 +103,11 @@
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/cgi_main.c php-5.2.17/sapi/cgi/cgi_main.c
+--- php-5.2.17.org/sapi/cgi/cgi_main.c	2021-10-23 19:05:04.013125101 +0200
++++ php-5.2.17/sapi/cgi/cgi_main.c	2021-10-23 19:05:06.359791768 +0200
+@@ -100,6 +100,11 @@ static void (*php_php_import_environment
   */
- static int parent = 1;
+ static int children = 0;
  
 +#if PHP_FASTCGI
 +/* Socket we are listening on incoming FastCGI connections */
@@ -29,9 +30,9 @@ echo "end!<br>\n";
 +#endif
 +
  /**
-  * Process group
+  * Set to non-zero if we are the parent process
   */
-@@ -1157,6 +1162,22 @@
+@@ -1225,6 +1230,22 @@ void fastcgi_cleanup(int signal)
  }
  #endif
  
@@ -54,7 +55,7 @@ echo "end!<br>\n";
  PHP_INI_BEGIN()
  	STD_PHP_INI_ENTRY("cgi.rfc2616_headers",     "0",  PHP_INI_ALL,    OnUpdateBool,   rfc2616_headers, php_cgi_globals_struct, php_cgi_globals)
  	STD_PHP_INI_ENTRY("cgi.nph",                 "0",  PHP_INI_ALL,    OnUpdateBool,   nph, php_cgi_globals_struct, php_cgi_globals)
-@@ -1275,7 +1296,6 @@
+@@ -1343,7 +1364,6 @@ int main(int argc, char *argv[])
  	int requests = 0;
  	int fastcgi = fcgi_is_fastcgi();
  	char *bindpath = NULL;
@@ -62,7 +63,7 @@ echo "end!<br>\n";
  	fcgi_request request;
  	int repeats = 1;
  	int benchmark = 0;
-@@ -1538,9 +1558,17 @@
+@@ -1632,9 +1652,17 @@ consult the installation file that came
  					parent = 0;
  
  					/* don't catch our signals */
diff --git a/php-fpm.patch b/php-fpm.patch
index 2d8e385..0b1c5e4 100644
--- a/php-fpm.patch
+++ b/php-fpm.patch
@@ -1,10 +1,7 @@
-diff --git a/configure b/configure
-index 2d88ed7..c490abf 100755
-diff --git a/configure.in b/configure.in
-index e181ac9..4424930 100644
---- a/configure.in
-+++ b/configure.in
-@@ -295,6 +295,12 @@ if test "$enable_maintainer_zts" = "yes"; then
+diff -urNp -x '*.orig' php-5.2.17.org/configure.in php-5.2.17/configure.in
+--- php-5.2.17.org/configure.in	2021-10-23 19:09:17.423125073 +0200
++++ php-5.2.17/configure.in	2021-10-23 19:09:19.823125073 +0200
+@@ -295,6 +295,12 @@ if test "$enable_maintainer_zts" = "yes"
    PTHREADS_FLAGS
  fi
  
@@ -17,7 +14,7 @@ index e181ac9..4424930 100644
  divert(3)
  
  dnl ## In diversion 3 we check for compile-time options to the PHP
-@@ -511,6 +517,7 @@ AC_CHECK_FUNCS(
+@@ -510,6 +516,7 @@ AC_CHECK_FUNCS(
  alphasort \
  asctime_r \
  chroot \
@@ -25,7 +22,7 @@ index e181ac9..4424930 100644
  ctime_r \
  cuserid \
  crypt \
-@@ -1253,6 +1260,8 @@ PHP_SUBST_OLD(EXTENSION_DIR)
+@@ -1247,6 +1254,8 @@ PHP_SUBST_OLD(EXTENSION_DIR)
  PHP_SUBST_OLD(EXTRA_LDFLAGS)
  PHP_SUBST_OLD(EXTRA_LDFLAGS_PROGRAM)
  PHP_SUBST_OLD(EXTRA_LIBS)
@@ -34,7 +31,7 @@ index e181ac9..4424930 100644
  PHP_SUBST_OLD(ZEND_EXTRA_LIBS)
  PHP_SUBST_OLD(INCLUDES)
  PHP_SUBST_OLD(EXTRA_INCLUDES)
-@@ -1364,7 +1373,7 @@ case $PHP_SAPI in
+@@ -1343,7 +1352,7 @@ case $PHP_SAPI in
      install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
      ;;
    *)
@@ -43,132 +40,9 @@ index e181ac9..4424930 100644
      ;;
  esac
  
-diff --git a/libevent/ChangeLog b/libevent/ChangeLog
-new file mode 100644
-index 0000000..c592139
-diff --git a/libevent/Makefile.am b/libevent/Makefile.am
-new file mode 100644
-index 0000000..5ccfd2c
-diff --git a/libevent/Makefile.in b/libevent/Makefile.in
-new file mode 100644
-index 0000000..0600dcc
-diff --git a/libevent/README b/libevent/README
-new file mode 100644
-index 0000000..b065039
-diff --git a/libevent/aclocal.m4 b/libevent/aclocal.m4
-new file mode 100644
-index 0000000..74de4a1
-diff --git a/libevent/autogen.sh b/libevent/autogen.sh
-new file mode 100644
-index 0000000..218dbf4
-diff --git a/libevent/buffer.c b/libevent/buffer.c
-new file mode 100644
-index 0000000..e66080f
-diff --git a/libevent/compat/sys/_time.h b/libevent/compat/sys/_time.h
-new file mode 100644
-index 0000000..8cabb0d
-diff --git a/libevent/compat/sys/queue.h b/libevent/compat/sys/queue.h
-new file mode 100644
-index 0000000..c0956dd
-diff --git a/libevent/config.h.in b/libevent/config.h.in
-new file mode 100644
-index 0000000..d151f87
-diff --git a/libevent/configure b/libevent/configure
-new file mode 100644
-index 0000000..0a74aec
-diff --git a/libevent/configure.in b/libevent/configure.in
-new file mode 100644
-index 0000000..852d3c5
-diff --git a/libevent/depcomp b/libevent/depcomp
-new file mode 100644
-index 0000000..ffcd540
-diff --git a/libevent/devpoll.c b/libevent/devpoll.c
-new file mode 100644
-index 0000000..cbd2730
-diff --git a/libevent/epoll.c b/libevent/epoll.c
-new file mode 100644
-index 0000000..cf3c859
-diff --git a/libevent/epoll_sub.c b/libevent/epoll_sub.c
-new file mode 100644
-index 0000000..431970c
-diff --git a/libevent/evbuffer.c b/libevent/evbuffer.c
-new file mode 100644
-index 0000000..f2179a5
-diff --git a/libevent/event-config.h b/libevent/event-config.h
-new file mode 100644
-index 0000000..0a278b3
-diff --git a/libevent/event-fpm.h b/libevent/event-fpm.h
-new file mode 100644
-index 0000000..8625ca5
-diff --git a/libevent/event-internal.h b/libevent/event-internal.h
-new file mode 100644
-index 0000000..7485f21
-diff --git a/libevent/event.3 b/libevent/event.3
-new file mode 100644
-index 0000000..5b33ec6
-diff --git a/libevent/event.c b/libevent/event.c
-new file mode 100644
-index 0000000..826b7db
-diff --git a/libevent/event.h b/libevent/event.h
-new file mode 100644
-index 0000000..d67ecb5
-diff --git a/libevent/evhttp.h b/libevent/evhttp.h
-new file mode 100644
-index 0000000..0d35f9e
-diff --git a/libevent/evport.c b/libevent/evport.c
-new file mode 100644
-index 0000000..31523b4
-diff --git a/libevent/evsignal.h b/libevent/evsignal.h
-new file mode 100644
-index 0000000..8be9cbd
-diff --git a/libevent/evutil.c b/libevent/evutil.c
-new file mode 100644
-index 0000000..86205b2
-diff --git a/libevent/evutil.h b/libevent/evutil.h
-new file mode 100644
-index 0000000..0a018b8
-diff --git a/libevent/http-internal.h b/libevent/http-internal.h
-new file mode 100644
-index 0000000..bc9a1ed
-diff --git a/libevent/http.c b/libevent/http.c
-new file mode 100644
-index 0000000..1d60fc5
-diff --git a/libevent/install-sh b/libevent/install-sh
-new file mode 100644
-index 0000000..1a83534
-diff --git a/libevent/kqueue.c b/libevent/kqueue.c
-new file mode 100644
-index 0000000..38a1819
-diff --git a/libevent/log.c b/libevent/log.c
-new file mode 100644
-index 0000000..b62a619
-diff --git a/libevent/log.h b/libevent/log.h
-new file mode 100644
-index 0000000..7bc6632
-diff --git a/libevent/min_heap.h b/libevent/min_heap.h
-new file mode 100644
-index 0000000..d47e563
-diff --git a/libevent/missing b/libevent/missing
-new file mode 100644
-index 0000000..09edd88
-diff --git a/libevent/poll.c b/libevent/poll.c
-new file mode 100644
-index 0000000..b67c6ff
-diff --git a/libevent/select.c b/libevent/select.c
-new file mode 100644
-index 0000000..7faafe4
-diff --git a/libevent/signal.c b/libevent/signal.c
-new file mode 100644
-index 0000000..bcaa3f9
-diff --git a/libevent/strlcpy-internal.h b/libevent/strlcpy-internal.h
-new file mode 100644
-index 0000000..22b5f61
-diff --git a/libevent/strlcpy.c b/libevent/strlcpy.c
-new file mode 100644
-index 0000000..a1a413d
-diff --git a/main/php_config.h.in b/main/php_config.h.in
---- a/main/php_config.h.in
-+++ b/main/php_config.h.in
+diff -urNp -x '*.orig' php-5.2.17.org/main/php_config.h.in php-5.2.17/main/php_config.h.in
+--- php-5.2.17.org/main/php_config.h.in	2011-01-07 00:04:47.000000000 +0100
++++ php-5.2.17/main/php_config.h.in	2021-10-23 19:09:19.826458407 +0200
 @@ -170,6 +170,9 @@
  /* Define if you have the chroot function.  */
  #undef HAVE_CHROOT
@@ -217,15 +91,16 @@ diff --git a/main/php_config.h.in b/main/php_config.h.in
  /* Define if system uses EBCDIC */
  #undef CHARSET_EBCDIC
  
---- php-5.2.17/sapi/cgi/Makefile.frag~	2012-02-27 14:44:23.000000000 +0200
-+++ php-5.2.17/sapi/cgi/Makefile.frag	2012-02-27 14:46:13.037731342 +0200
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/Makefile.frag php-5.2.17/sapi/cgi/Makefile.frag
+--- php-5.2.17.org/sapi/cgi/Makefile.frag	2021-10-23 19:09:17.386458407 +0200
++++ php-5.2.17/sapi/cgi/Makefile.frag	2021-10-23 19:09:19.826458407 +0200
 @@ -1,2 +1,2 @@
 -$(SAPI_CGI_PATH): libphp_common.la $(PHP_SAPI_OBJS)
 +$(SAPI_CGI_PATH): libphp_common.la $(PHP_SAPI_OBJS) $(SAPI_EXTRA_DEPS)
  	$(BUILD_CGI)
-diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
---- a/sapi/cgi/cgi_main.c
-+++ b/sapi/cgi/cgi_main.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/cgi_main.c php-5.2.17/sapi/cgi/cgi_main.c
+--- php-5.2.17.org/sapi/cgi/cgi_main.c	2021-10-23 19:09:17.429791741 +0200
++++ php-5.2.17/sapi/cgi/cgi_main.c	2021-10-23 19:09:19.826458407 +0200
 @@ -55,6 +55,9 @@
  #if HAVE_SYS_WAIT_H
  #include <sys/wait.h>
@@ -236,7 +111,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  #include "zend.h"
  #include "zend_extensions.h"
  #include "php_ini.h"
-@@ -83,6 +86,11 @@ int __riscosify_control = __RISCOSIFY_STRICT_UNIX_SPECS;
+@@ -85,6 +88,11 @@ int __riscosify_control = __RISCOSIFY_ST
  #if PHP_FASTCGI
  #include "fastcgi.h"
  
@@ -248,7 +123,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  #ifndef PHP_WIN32
  /* XXX this will need to change later when threaded fastcgi is
     implemented.  shane */
-@@ -115,8 +123,12 @@ static int parent_waiting = 0;
+@@ -122,8 +130,12 @@ static int parent_waiting = 0;
  static pid_t pgroup;
  #endif
  
@@ -261,7 +136,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  #define PHP_MODE_STANDARD	1
  #define PHP_MODE_HIGHLIGHT	2
  #define PHP_MODE_INDENT		3
-@@ -146,6 +158,10 @@ static const opt_struct OPTIONS[] = {
+@@ -153,6 +165,10 @@ static const opt_struct OPTIONS[] = {
  	{'w', 0, "strip"},
  	{'?', 0, "usage"},/* help alias (both '?' and 'usage') */
  	{'v', 0, "version"},
@@ -272,7 +147,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  	{'z', 1, "zend-extension"},
  #if PHP_FASTCGI
   	{'T', 1, "timing"},
-@@ -170,6 +186,7 @@ typedef struct _php_cgi_globals_struct {
+@@ -177,6 +193,7 @@ typedef struct _php_cgi_globals_struct {
  	zend_bool impersonate;
  # endif
  #endif
@@ -280,7 +155,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  } php_cgi_globals_struct;
  
  #ifdef ZTS
-@@ -474,7 +491,28 @@ static int sapi_cgi_read_post(char *buffer, uint count_bytes TSRMLS_DC)
+@@ -481,7 +498,28 @@ static int sapi_cgi_read_post(char *buff
  #if PHP_FASTCGI
  		if (fcgi_is_fastcgi()) {
  			fcgi_request *request = (fcgi_request*) SG(server_context);
@@ -310,7 +185,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  		} else {
  			tmp_read_bytes = read(STDIN_FILENO, buffer + read_bytes, count_bytes - read_bytes);
  		}
-@@ -786,7 +824,12 @@ static void php_cgi_usage(char *argv0)
+@@ -796,7 +834,12 @@ static void php_cgi_usage(char *argv0)
  			   "  -s               Display colour syntax highlighted source.\n"
  			   "  -v               Version number\n"
  			   "  -w               Display source with stripped comments and whitespace.\n"
@@ -324,7 +199,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  #if PHP_FASTCGI
  			   "  -T <count>       Measure execution time of script repeated <count> times.\n"
  #endif
-@@ -1236,6 +1279,7 @@ PHP_INI_BEGIN()
+@@ -1262,6 +1305,7 @@ PHP_INI_BEGIN()
  # ifdef PHP_WIN32
  	STD_PHP_INI_ENTRY("fastcgi.impersonate",     "0",  PHP_INI_SYSTEM, OnUpdateBool,   impersonate, php_cgi_globals_struct, php_cgi_globals)
  # endif
@@ -332,7 +207,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  #endif
  PHP_INI_END()
  
-@@ -1258,6 +1302,7 @@ static void php_cgi_globals_ctor(php_cgi_globals_struct *php_cgi_globals TSRMLS_
+@@ -1284,6 +1328,7 @@ static void php_cgi_globals_ctor(php_cgi
  # ifdef PHP_WIN32
  	php_cgi_globals->impersonate = 0;
  # endif
@@ -340,7 +215,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  #endif
  }
  /* }}} */
-@@ -1290,9 +1335,47 @@ static PHP_MSHUTDOWN_FUNCTION(cgi)
+@@ -1316,9 +1361,47 @@ static PHP_MSHUTDOWN_FUNCTION(cgi)
  static PHP_MINFO_FUNCTION(cgi)
  {
  	DISPLAY_INI_ENTRIES();
@@ -388,7 +263,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  static zend_module_entry cgi_module_entry = {
  	STANDARD_MODULE_HEADER,
  #if PHP_FASTCGI
-@@ -1300,7 +1383,7 @@ static zend_module_entry cgi_module_entry = {
+@@ -1326,7 +1409,7 @@ static zend_module_entry cgi_module_entr
  #else
  	"cgi",
  #endif
@@ -397,15 +272,15 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  	PHP_MINIT(cgi), 
  	PHP_MSHUTDOWN(cgi), 
  	NULL, 
-@@ -1340,6 +1423,7 @@ int main(int argc, char *argv[])
+@@ -1365,6 +1448,7 @@ int main(int argc, char *argv[])
+ 	int fastcgi = fcgi_is_fastcgi();
  	char *bindpath = NULL;
- 	int fcgi_fd = 0;
  	fcgi_request request;
 +	char *fpm_config = NULL;
  	int repeats = 1;
  	int benchmark = 0;
  #if HAVE_GETTIMEOFDAY
-@@ -1460,6 +1544,14 @@ int main(int argc, char *argv[])
+@@ -1502,6 +1586,14 @@ int main(int argc, char *argv[])
  			case 's': /* generate highlighted HTML from source */
  				behavior = PHP_MODE_HIGHLIGHT;
  				break;
@@ -420,7 +295,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  
  		}
  
-@@ -1524,6 +1616,19 @@ consult the installation file that came with this distribution, or visit \n\
+@@ -1566,6 +1658,19 @@ consult the installation file that came
  #endif	/* FORCE_CGI_REDIRECT */
  
  #if PHP_FASTCGI
@@ -440,7 +315,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  	if (bindpath) {
  		fcgi_fd = fcgi_listen(bindpath, 128);
  		if (fcgi_fd < 0) {
-@@ -1538,6 +1643,9 @@ consult the installation file that came with this distribution, or visit \n\
+@@ -1580,6 +1685,9 @@ consult the installation file that came
  	
  	if (fastcgi) {
  		/* How many times to run PHP scripts before dying */
@@ -450,7 +325,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  		if (getenv("PHP_FCGI_MAX_REQUESTS")) {
  			max_requests = atoi(getenv("PHP_FCGI_MAX_REQUESTS"));
  			if (max_requests < 0) {
-@@ -1555,6 +1663,9 @@ consult the installation file that came with this distribution, or visit \n\
+@@ -1597,6 +1705,9 @@ consult the installation file that came
  
  #ifndef PHP_WIN32
  	/* Pre-fork, if required */
@@ -460,7 +335,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  	if (getenv("PHP_FCGI_CHILDREN")) {
  		char * children_str = getenv("PHP_FCGI_CHILDREN");
  		children = atoi(children_str);
-@@ -1704,6 +1815,8 @@ consult the installation file that came with this distribution, or visit \n\
+@@ -1754,6 +1865,8 @@ consult the installation file that came
  #endif
  
  #if PHP_FASTCGI
@@ -469,7 +344,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  		SG(server_context) = (void *) &request;
  #else
  		SG(server_context) = (void *) 1; /* avoid server_context==NULL checks */
-@@ -1711,6 +1824,10 @@ consult the installation file that came with this distribution, or visit \n\
+@@ -1761,6 +1874,10 @@ consult the installation file that came
  		init_request_info(TSRMLS_C);
  		CG(interactive) = 0;
  
@@ -480,7 +355,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  		if (!cgi
  #if PHP_FASTCGI
  			&& !fastcgi
-@@ -1994,6 +2111,10 @@ consult the installation file that came with this distribution, or visit \n\
+@@ -2043,6 +2160,10 @@ consult the installation file that came
  			}
  		}
  
@@ -491,7 +366,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  		switch (behavior) {
  			case PHP_MODE_STANDARD:
  				php_execute_script(&file_handle TSRMLS_CC);
-@@ -2046,6 +2167,10 @@ consult the installation file that came with this distribution, or visit \n\
+@@ -2095,6 +2216,10 @@ consult the installation file that came
  
  #if PHP_FASTCGI
  fastcgi_request_done:
@@ -502,7 +377,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  #endif
  		{
  			char *path_translated;
-@@ -2059,6 +2184,16 @@ fastcgi_request_done:
+@@ -2108,6 +2233,16 @@ fastcgi_request_done:
  				SG(request_info).path_translated = path_translated;
  			}
  
@@ -519,7 +394,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  			php_request_shutdown((void *) 0);
  			if (exit_status == 0) {
  				exit_status = EG(exit_status);
-@@ -2096,15 +2231,20 @@ fastcgi_request_done:
+@@ -2145,15 +2280,20 @@ fastcgi_request_done:
  				if (bindpath) {
  					free(bindpath);
  				}
@@ -544,8 +419,9 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  #endif
  
  		if (cgi_sapi_module.php_ini_path_override) {
---- php-5.2.17/sapi/cgi/config9.m4~	2012-02-27 14:44:23.000000000 +0200
-+++ php-5.2.17/sapi/cgi/config9.m4	2012-02-27 14:48:07.279580606 +0200
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/config9.m4 php-5.2.17/sapi/cgi/config9.m4
+--- php-5.2.17.org/sapi/cgi/config9.m4	2021-10-23 19:09:17.386458407 +0200
++++ php-5.2.17/sapi/cgi/config9.m4	2021-10-23 19:09:19.826458407 +0200
 @@ -22,6 +22,10 @@ PHP_ARG_ENABLE(path-info-check,,
  [  --disable-path-info-check CGI: If this is disabled, paths such as
                              /info.php/test?a=b will fail to work], yes, no)
@@ -578,7 +454,7 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
      dnl --enable-force-cgi-redirect
      AC_MSG_CHECKING(whether to force Apache CGI redirect)
      if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
-@@ -111,10 +111,10 @@
+@@ -93,10 +111,10 @@ if test "$PHP_SAPI" = "default"; then
          BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
          ;;
        *darwin*)
@@ -591,9 +467,9 @@ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
        ;;
      esac
  
-diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
---- a/sapi/cgi/fastcgi.c
-+++ b/sapi/cgi/fastcgi.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fastcgi.c php-5.2.17/sapi/cgi/fastcgi.c
+--- php-5.2.17.org/sapi/cgi/fastcgi.c	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/sapi/cgi/fastcgi.c	2021-10-23 19:09:19.826458407 +0200
 @@ -27,6 +27,11 @@
  #include <stdarg.h>
  #include <errno.h>
@@ -684,7 +560,7 @@ diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
  static int is_port_number(const char *bindpath)
  {
  	while (*bindpath) {
-@@ -458,38 +512,6 @@ int fcgi_listen(const char *path, int backlog)
+@@ -458,38 +512,6 @@ int fcgi_listen(const char *path, int ba
  
  	if (!tcp) {
  		chmod(path, 0777);
@@ -723,7 +599,7 @@ diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
  	}
  
  	if (!is_initialized) {
-@@ -866,7 +888,7 @@ int fcgi_read(fcgi_request *req, char *str, int len)
+@@ -866,7 +888,7 @@ int fcgi_read(fcgi_request *req, char *s
  	return n;
  }
  
@@ -732,7 +608,7 @@ diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
  {
  	if (destroy) {
  		zend_hash_destroy(&req->env);
-@@ -906,6 +928,10 @@ static inline void fcgi_close(fcgi_request *req, int force, int destroy)
+@@ -906,6 +928,10 @@ static inline void fcgi_close(fcgi_reque
  		close(req->fd);
  #endif
  		req->fd = -1;
@@ -743,7 +619,7 @@ diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
  	}
  }
  
-@@ -953,6 +979,10 @@ int fcgi_accept_request(fcgi_request *req)
+@@ -953,6 +979,10 @@ int fcgi_accept_request(fcgi_request *re
  					sa_t sa;
  					socklen_t len = sizeof(sa);
  
@@ -754,7 +630,7 @@ diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
  					FCGI_LOCK(req->listen_socket);
  					req->fd = accept(listen_socket, (struct sockaddr *)&sa, &len);
  					FCGI_UNLOCK(req->listen_socket);
-@@ -988,6 +1018,11 @@ int fcgi_accept_request(fcgi_request *req)
+@@ -988,6 +1018,11 @@ int fcgi_accept_request(fcgi_request *re
  				break;
  #else
  				if (req->fd >= 0) {
@@ -766,9 +642,9 @@ diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
  #if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
  					struct pollfd fds;
  					int ret;
-diff --git a/sapi/cgi/fastcgi.h b/sapi/cgi/fastcgi.h
---- a/sapi/cgi/fastcgi.h
-+++ b/sapi/cgi/fastcgi.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fastcgi.h php-5.2.17/sapi/cgi/fastcgi.h
+--- php-5.2.17.org/sapi/cgi/fastcgi.h	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/sapi/cgi/fastcgi.h	2021-10-23 19:09:19.826458407 +0200
 @@ -114,6 +114,9 @@ typedef struct _fcgi_request {
  int fcgi_init(void);
  void fcgi_shutdown(void);
@@ -779,7 +655,7 @@ diff --git a/sapi/cgi/fastcgi.h b/sapi/cgi/fastcgi.h
  int fcgi_in_shutdown(void);
  int fcgi_listen(const char *path, int backlog);
  void fcgi_init_request(fcgi_request *req, int listen_socket);
-@@ -128,6 +131,8 @@ int fcgi_read(fcgi_request *req, char *str, int len);
+@@ -128,6 +131,8 @@ int fcgi_read(fcgi_request *req, char *s
  int fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, int len);
  int fcgi_flush(fcgi_request *req, int close);
  
@@ -788,10 +664,9 @@ diff --git a/sapi/cgi/fastcgi.h b/sapi/cgi/fastcgi.h
  #ifdef PHP_WIN32
  void fcgi_impersonate(void);
  #endif
-diff --git a/sapi/cgi/fpm/Makefile.frag b/sapi/cgi/fpm/Makefile.frag
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/Makefile.frag
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/Makefile.frag php-5.2.17/sapi/cgi/fpm/Makefile.frag
+--- php-5.2.17.org/sapi/cgi/fpm/Makefile.frag	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/Makefile.frag	2021-10-23 19:09:19.826458407 +0200
 @@ -0,0 +1,21 @@
 +
 +install-fpm: sapi/cgi/fpm/php-fpm.conf sapi/cgi/fpm/php-fpm
@@ -814,10 +689,9 @@ new file mode 100644
 +$(top_builddir)/libevent/libevent.a: $(top_builddir)/libevent/Makefile
 +	cd $(top_builddir)/libevent && $(MAKE) libevent.a
 +
-diff --git a/sapi/cgi/fpm/acinclude.m4 b/sapi/cgi/fpm/acinclude.m4
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/acinclude.m4
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/acinclude.m4 php-5.2.17/sapi/cgi/fpm/acinclude.m4
+--- php-5.2.17.org/sapi/cgi/fpm/acinclude.m4	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/acinclude.m4	2021-10-23 19:09:19.826458407 +0200
 @@ -0,0 +1,377 @@
 +
 +AC_DEFUN([AC_FPM_CHECK_FUNC],
@@ -1196,10 +1070,9 @@ new file mode 100644
 +		AC_MSG_RESULT([no])
 +	])
 +])
-diff --git a/sapi/cgi/fpm/conf/php-fpm.conf.in b/sapi/cgi/fpm/conf/php-fpm.conf.in
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/conf/php-fpm.conf.in
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/conf/php-fpm.conf.in php-5.2.17/sapi/cgi/fpm/conf/php-fpm.conf.in
+--- php-5.2.17.org/sapi/cgi/fpm/conf/php-fpm.conf.in	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/conf/php-fpm.conf.in	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,156 @@
 +<?xml version="1.0" ?>
 +<configuration>
@@ -1357,10 +1230,9 @@ new file mode 100644
 +	</workers>
 +
 +</configuration>
-diff --git a/sapi/cgi/fpm/config.m4 b/sapi/cgi/fpm/config.m4
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/config.m4
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/config.m4 php-5.2.17/sapi/cgi/fpm/config.m4
+--- php-5.2.17.org/sapi/cgi/fpm/config.m4	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/config.m4	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,117 @@
 +
 +FPM_VERSION="0.5.14"
@@ -1479,11 +1351,9 @@ new file mode 100644
 +PHP_OUTPUT(sapi/cgi/fpm/fpm_autoconf.h)
 +PHP_OUTPUT(sapi/cgi/fpm/php-fpm.conf:sapi/cgi/fpm/conf/php-fpm.conf.in)
 +PHP_OUTPUT(sapi/cgi/fpm/php-fpm:sapi/cgi/fpm/init.d/php-fpm.in)
-diff --git a/sapi/cgi/fpm/fpm.c b/sapi/cgi/fpm/fpm.c
-new file mode 100644
-index 0000000..9db2c9b
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm.c php-5.2.17/sapi/cgi/fpm/fpm.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm.c	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,84 @@
 +
 +	/* $Id$ */
@@ -1569,10 +1439,9 @@ index 0000000..9db2c9b
 +	return fpm_globals.listening_socket;
 +}
 +
-diff --git a/sapi/cgi/fpm/fpm.h b/sapi/cgi/fpm/fpm.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm.h php-5.2.17/sapi/cgi/fpm/fpm.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,30 @@
 +
 +	/* $Id$ */
@@ -1604,10 +1473,9 @@ new file mode 100644
 +extern int fpm;
 +
 +#endif
-diff --git a/sapi/cgi/fpm/fpm_arrays.h b/sapi/cgi/fpm/fpm_arrays.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_arrays.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_arrays.h php-5.2.17/sapi/cgi/fpm/fpm_arrays.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_arrays.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_arrays.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,110 @@
 +
 +	/* $Id$ */
@@ -1719,10 +1587,9 @@ new file mode 100644
 +}
 +
 +#endif
-diff --git a/sapi/cgi/fpm/fpm_atomic.h b/sapi/cgi/fpm/fpm_atomic.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_atomic.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_atomic.h php-5.2.17/sapi/cgi/fpm/fpm_atomic.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_atomic.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_atomic.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,85 @@
 +
 +	/* $Id$ */
@@ -1809,10 +1676,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_autoconf.h.in b/sapi/cgi/fpm/fpm_autoconf.h.in
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_autoconf.h.in
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_autoconf.h.in php-5.2.17/sapi/cgi/fpm/fpm_autoconf.h.in
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_autoconf.h.in	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_autoconf.h.in	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,9 @@
 +
 +	/* $Id$ */
@@ -1823,10 +1689,9 @@ new file mode 100644
 +#define PHP_FPM_LOG_PATH  "@php_fpm_log_path@"
 +#define PHP_FPM_PID_PATH  "@php_fpm_pid_path@"
 +
-diff --git a/sapi/cgi/fpm/fpm_children.c b/sapi/cgi/fpm/fpm_children.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_children.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_children.c php-5.2.17/sapi/cgi/fpm/fpm_children.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_children.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_children.c	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,385 @@
 +
 +	/* $Id$ */
@@ -2213,10 +2078,9 @@ new file mode 100644
 +	return 0;
 +}
 +
-diff --git a/sapi/cgi/fpm/fpm_children.h b/sapi/cgi/fpm/fpm_children.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_children.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_children.h php-5.2.17/sapi/cgi/fpm/fpm_children.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_children.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_children.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,33 @@
 +
 +	/* $Id$ */
@@ -2251,10 +2115,9 @@ new file mode 100644
 +};
 +
 +#endif
-diff --git a/sapi/cgi/fpm/fpm_cleanup.c b/sapi/cgi/fpm/fpm_cleanup.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_cleanup.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_cleanup.c php-5.2.17/sapi/cgi/fpm/fpm_cleanup.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_cleanup.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_cleanup.c	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,51 @@
 +
 +	/* $Id$ */
@@ -2307,10 +2170,9 @@ new file mode 100644
 +	fpm_array_free(&cleanups);
 +}
 +
-diff --git a/sapi/cgi/fpm/fpm_cleanup.h b/sapi/cgi/fpm/fpm_cleanup.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_cleanup.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_cleanup.h php-5.2.17/sapi/cgi/fpm/fpm_cleanup.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_cleanup.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_cleanup.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,21 @@
 +
 +	/* $Id$ */
@@ -2333,10 +2195,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_clock.c b/sapi/cgi/fpm/fpm_clock.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_clock.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_clock.c php-5.2.17/sapi/cgi/fpm/fpm_clock.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_clock.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_clock.c	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,115 @@
 +
 +	/* $Id$ */
@@ -2453,10 +2314,9 @@ new file mode 100644
 +}
 +
 +#endif
-diff --git a/sapi/cgi/fpm/fpm_clock.h b/sapi/cgi/fpm/fpm_clock.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_clock.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_clock.h php-5.2.17/sapi/cgi/fpm/fpm_clock.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_clock.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_clock.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,13 @@
 +
 +	/* $Id$ */
@@ -2471,10 +2331,9 @@ new file mode 100644
 +int fpm_clock_get(struct timeval *tv);
 +
 +#endif
-diff --git a/sapi/cgi/fpm/fpm_conf.c b/sapi/cgi/fpm/fpm_conf.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_conf.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_conf.c php-5.2.17/sapi/cgi/fpm/fpm_conf.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_conf.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_conf.c	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,532 @@
 +
 +	/* $Id$ */
@@ -3008,10 +2867,9 @@ new file mode 100644
 +
 +	return 0;
 +}
-diff --git a/sapi/cgi/fpm/fpm_conf.h b/sapi/cgi/fpm/fpm_conf.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_conf.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_conf.h php-5.2.17/sapi/cgi/fpm/fpm_conf.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_conf.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_conf.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,73 @@
 +
 +	/* $Id$ */
@@ -3086,10 +2944,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_config.h b/sapi/cgi/fpm/fpm_config.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_config.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_config.h php-5.2.17/sapi/cgi/fpm/fpm_config.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_config.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_config.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,39 @@
 +
 +	/* $Id$ */
@@ -3130,10 +2987,9 @@ new file mode 100644
 +#define HAVE_FPM_TRACE 0
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_env.c b/sapi/cgi/fpm/fpm_env.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_env.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_env.c php-5.2.17/sapi/cgi/fpm/fpm_env.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_env.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_env.c	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,125 @@
 +
 +	/* $Id$ */
@@ -3260,10 +3116,9 @@ new file mode 100644
 +
 +	return 0;
 +}
-diff --git a/sapi/cgi/fpm/fpm_env.h b/sapi/cgi/fpm/fpm_env.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_env.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_env.h php-5.2.17/sapi/cgi/fpm/fpm_env.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_env.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_env.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,24 @@
 +
 +	/* $Id$ */
@@ -3289,10 +3144,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_events.c b/sapi/cgi/fpm/fpm_events.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_events.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_events.c php-5.2.17/sapi/cgi/fpm/fpm_events.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_events.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_events.c	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,135 @@
 +
 +	/* $Id$ */
@@ -3429,10 +3283,9 @@ new file mode 100644
 +	(*ev->ev_callback)( (int) ev->ev_fd, (short) ev->ev_res, ev->ev_arg);	
 +}
 +
-diff --git a/sapi/cgi/fpm/fpm_events.h b/sapi/cgi/fpm/fpm_events.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_events.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_events.h php-5.2.17/sapi/cgi/fpm/fpm_events.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_events.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_events.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,16 @@
 +
 +	/* $Id$ */
@@ -3450,10 +3303,9 @@ new file mode 100644
 +
 +
 +#endif
-diff --git a/sapi/cgi/fpm/fpm_php.c b/sapi/cgi/fpm/fpm_php.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_php.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_php.c php-5.2.17/sapi/cgi/fpm/fpm_php.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_php.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_php.c	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,190 @@
 +
 +	/* $Id$ */
@@ -3645,10 +3497,9 @@ new file mode 100644
 +
 +	return 0;
 +}
-diff --git a/sapi/cgi/fpm/fpm_php.h b/sapi/cgi/fpm/fpm_php.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_php.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_php.h php-5.2.17/sapi/cgi/fpm/fpm_php.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_php.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_php.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,22 @@
 +
 +	/* $Id$ */
@@ -3672,10 +3523,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_php_trace.c b/sapi/cgi/fpm/fpm_php_trace.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_php_trace.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_php_trace.c php-5.2.17/sapi/cgi/fpm/fpm_php_trace.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_php_trace.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_php_trace.c	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,171 @@
 +
 +	/* $Id$ */
@@ -3848,10 +3698,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_php_trace.h b/sapi/cgi/fpm/fpm_php_trace.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_php_trace.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_php_trace.h php-5.2.17/sapi/cgi/fpm/fpm_php_trace.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_php_trace.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_php_trace.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,13 @@
 +
 +	/* $Id$ */
@@ -3866,10 +3715,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_process_ctl.c b/sapi/cgi/fpm/fpm_process_ctl.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_process_ctl.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_process_ctl.c php-5.2.17/sapi/cgi/fpm/fpm_process_ctl.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_process_ctl.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_process_ctl.c	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,354 @@
 +
 +	/* $Id$ */
@@ -4225,10 +4073,9 @@ new file mode 100644
 +	evtimer_add(&heartbeat, &tv);
 +}
 +
-diff --git a/sapi/cgi/fpm/fpm_process_ctl.h b/sapi/cgi/fpm/fpm_process_ctl.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_process_ctl.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_process_ctl.h php-5.2.17/sapi/cgi/fpm/fpm_process_ctl.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_process_ctl.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_process_ctl.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,39 @@
 +
 +	/* $Id$ */
@@ -4269,10 +4116,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_request.c b/sapi/cgi/fpm/fpm_request.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_request.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_request.c php-5.2.17/sapi/cgi/fpm/fpm_request.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_request.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_request.c	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,164 @@
 +
 +	/* $Id$ */
@@ -4438,10 +4284,9 @@ new file mode 100644
 +
 +}
 +
-diff --git a/sapi/cgi/fpm/fpm_request.h b/sapi/cgi/fpm/fpm_request.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_request.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_request.h php-5.2.17/sapi/cgi/fpm/fpm_request.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_request.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_request.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,27 @@
 +
 +	/* $Id$ */
@@ -4470,10 +4315,9 @@ new file mode 100644
 +};
 +
 +#endif
-diff --git a/sapi/cgi/fpm/fpm_shm.c b/sapi/cgi/fpm/fpm_shm.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_shm.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_shm.c php-5.2.17/sapi/cgi/fpm/fpm_shm.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_shm.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_shm.c	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,100 @@
 +
 +	/* $Id$ */
@@ -4575,10 +4419,9 @@ new file mode 100644
 +	return ret;
 +}
 +
-diff --git a/sapi/cgi/fpm/fpm_shm.h b/sapi/cgi/fpm/fpm_shm.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_shm.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_shm.h php-5.2.17/sapi/cgi/fpm/fpm_shm.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_shm.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_shm.h	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,22 @@
 +
 +	/* $Id$ */
@@ -4602,10 +4445,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_shm_slots.c b/sapi/cgi/fpm/fpm_shm_slots.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_shm_slots.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_shm_slots.c php-5.2.17/sapi/cgi/fpm/fpm_shm_slots.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_shm_slots.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_shm_slots.c	2021-10-23 19:09:19.829791741 +0200
 @@ -0,0 +1,127 @@
 +
 +	/* $Id$ */
@@ -4734,10 +4576,9 @@ new file mode 100644
 +	s->lock = 0;
 +}
 +
-diff --git a/sapi/cgi/fpm/fpm_shm_slots.h b/sapi/cgi/fpm/fpm_shm_slots.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_shm_slots.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_shm_slots.h php-5.2.17/sapi/cgi/fpm/fpm_shm_slots.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_shm_slots.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_shm_slots.h	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,43 @@
 +
 +	/* $Id$ */
@@ -4782,10 +4623,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_signals.c b/sapi/cgi/fpm/fpm_signals.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_signals.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_signals.c php-5.2.17/sapi/cgi/fpm/fpm_signals.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_signals.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_signals.c	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,252 @@
 +
 +	/* $Id$ */
@@ -5039,10 +4879,9 @@ new file mode 100644
 +{
 +	return sp[0];
 +}
-diff --git a/sapi/cgi/fpm/fpm_signals.h b/sapi/cgi/fpm/fpm_signals.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_signals.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_signals.h php-5.2.17/sapi/cgi/fpm/fpm_signals.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_signals.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_signals.h	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,16 @@
 +
 +	/* $Id$ */
@@ -5060,10 +4899,9 @@ new file mode 100644
 +extern const char *fpm_signal_names[NSIG + 1];
 +
 +#endif
-diff --git a/sapi/cgi/fpm/fpm_sockets.c b/sapi/cgi/fpm/fpm_sockets.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_sockets.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_sockets.c php-5.2.17/sapi/cgi/fpm/fpm_sockets.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_sockets.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_sockets.c	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,427 @@
 +
 +	/* $Id$ */
@@ -5492,10 +5330,9 @@ new file mode 100644
 +
 +	return 0;
 +}
-diff --git a/sapi/cgi/fpm/fpm_sockets.h b/sapi/cgi/fpm/fpm_sockets.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_sockets.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_sockets.h php-5.2.17/sapi/cgi/fpm/fpm_sockets.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_sockets.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_sockets.h	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,37 @@
 +
 +	/* $Id$ */
@@ -5534,10 +5371,9 @@ new file mode 100644
 +			(unsigned int) ((unsigned char *) &(sin_addr)->s_addr)[3]
 +
 +#endif
-diff --git a/sapi/cgi/fpm/fpm_stdio.c b/sapi/cgi/fpm/fpm_stdio.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_stdio.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_stdio.c php-5.2.17/sapi/cgi/fpm/fpm_stdio.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_stdio.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_stdio.c	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,286 @@
 +
 +	/* $Id$ */
@@ -5825,10 +5661,9 @@ new file mode 100644
 +
 +	return 0;
 +}
-diff --git a/sapi/cgi/fpm/fpm_stdio.h b/sapi/cgi/fpm/fpm_stdio.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_stdio.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_stdio.h php-5.2.17/sapi/cgi/fpm/fpm_stdio.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_stdio.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_stdio.h	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,20 @@
 +
 +	/* $Id$ */
@@ -5850,10 +5685,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_str.h b/sapi/cgi/fpm/fpm_str.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_str.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_str.h php-5.2.17/sapi/cgi/fpm/fpm_str.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_str.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_str.h	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,49 @@
 +
 +	/* $Id$ */
@@ -5904,10 +5738,9 @@ new file mode 100644
 +}
 +
 +#endif
-diff --git a/sapi/cgi/fpm/fpm_trace.c b/sapi/cgi/fpm/fpm_trace.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_trace.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_trace.c php-5.2.17/sapi/cgi/fpm/fpm_trace.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_trace.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_trace.c	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,46 @@
 +
 +	/* $Id$ */
@@ -5955,10 +5788,9 @@ new file mode 100644
 +	}
 +}
 +
-diff --git a/sapi/cgi/fpm/fpm_trace.h b/sapi/cgi/fpm/fpm_trace.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_trace.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_trace.h php-5.2.17/sapi/cgi/fpm/fpm_trace.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_trace.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_trace.h	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,17 @@
 +
 +	/* $Id$ */
@@ -5977,10 +5809,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_trace_mach.c b/sapi/cgi/fpm/fpm_trace_mach.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_trace_mach.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_trace_mach.c php-5.2.17/sapi/cgi/fpm/fpm_trace_mach.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_trace_mach.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_trace_mach.c	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,102 @@
 +
 +	/* $Id$ */
@@ -6084,10 +5915,9 @@ new file mode 100644
 +	return 0;
 +}
 +
-diff --git a/sapi/cgi/fpm/fpm_trace_pread.c b/sapi/cgi/fpm/fpm_trace_pread.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_trace_pread.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_trace_pread.c php-5.2.17/sapi/cgi/fpm/fpm_trace_pread.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_trace_pread.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_trace_pread.c	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,67 @@
 +
 +	/* $Id$ */
@@ -6156,10 +5986,9 @@ new file mode 100644
 +	return 0;
 +}
 +
-diff --git a/sapi/cgi/fpm/fpm_trace_ptrace.c b/sapi/cgi/fpm/fpm_trace_ptrace.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_trace_ptrace.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_trace_ptrace.c php-5.2.17/sapi/cgi/fpm/fpm_trace_ptrace.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_trace_ptrace.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_trace_ptrace.c	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,85 @@
 +
 +	/* $Id$ */
@@ -6246,10 +6075,9 @@ new file mode 100644
 +	return 0;
 +}
 +
-diff --git a/sapi/cgi/fpm/fpm_unix.c b/sapi/cgi/fpm/fpm_unix.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_unix.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_unix.c php-5.2.17/sapi/cgi/fpm/fpm_unix.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_unix.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_unix.c	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,289 @@
 +
 +	/* $Id$ */
@@ -6540,10 +6368,9 @@ new file mode 100644
 +
 +	return 0;
 +}
-diff --git a/sapi/cgi/fpm/fpm_unix.h b/sapi/cgi/fpm/fpm_unix.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_unix.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_unix.h php-5.2.17/sapi/cgi/fpm/fpm_unix.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_unix.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_unix.h	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,17 @@
 +
 +	/* $Id$ */
@@ -6562,10 +6389,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/fpm_worker_pool.c b/sapi/cgi/fpm/fpm_worker_pool.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_worker_pool.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_worker_pool.c php-5.2.17/sapi/cgi/fpm/fpm_worker_pool.c
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_worker_pool.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_worker_pool.c	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,69 @@
 +
 +	/* $Id$ */
@@ -6636,10 +6462,9 @@ new file mode 100644
 +
 +	return 0;
 +}
-diff --git a/sapi/cgi/fpm/fpm_worker_pool.h b/sapi/cgi/fpm/fpm_worker_pool.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/fpm_worker_pool.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/fpm_worker_pool.h php-5.2.17/sapi/cgi/fpm/fpm_worker_pool.h
+--- php-5.2.17.org/sapi/cgi/fpm/fpm_worker_pool.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/fpm_worker_pool.h	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,46 @@
 +
 +	/* $Id$ */
@@ -6687,10 +6512,9 @@ new file mode 100644
 +
 +#endif
 +
-diff --git a/sapi/cgi/fpm/init.d/php-fpm.in b/sapi/cgi/fpm/init.d/php-fpm.in
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/init.d/php-fpm.in
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/init.d/php-fpm.in php-5.2.17/sapi/cgi/fpm/init.d/php-fpm.in
+--- php-5.2.17.org/sapi/cgi/fpm/init.d/php-fpm.in	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/init.d/php-fpm.in	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,139 @@
 +#! /bin/sh
 +
@@ -6831,10 +6655,9 @@ new file mode 100644
 +	;;
 +
 +esac
-diff --git a/sapi/cgi/fpm/xml_config.c b/sapi/cgi/fpm/xml_config.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/xml_config.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/xml_config.c php-5.2.17/sapi/cgi/fpm/xml_config.c
+--- php-5.2.17.org/sapi/cgi/fpm/xml_config.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/xml_config.c	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,278 @@
 +
 +	/* $Id$ */
@@ -7114,10 +6937,9 @@ new file mode 100644
 +	return 0;
 +}
 +
-diff --git a/sapi/cgi/fpm/xml_config.h b/sapi/cgi/fpm/xml_config.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/xml_config.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/xml_config.h php-5.2.17/sapi/cgi/fpm/xml_config.h
+--- php-5.2.17.org/sapi/cgi/fpm/xml_config.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/xml_config.h	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,43 @@
 +
 +	/* $Id$ */
@@ -7162,10 +6984,9 @@ new file mode 100644
 +enum { XML_CONF_SCALAR = 1, XML_CONF_SUBSECTION = 2 };
 +
 +#endif
-diff --git a/sapi/cgi/fpm/zlog.c b/sapi/cgi/fpm/zlog.c
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/zlog.c
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/zlog.c php-5.2.17/sapi/cgi/fpm/zlog.c
+--- php-5.2.17.org/sapi/cgi/fpm/zlog.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/zlog.c	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,113 @@
 +
 +	/* $Id$ */
@@ -7280,10 +7101,9 @@ new file mode 100644
 +
 +	write(zlog_fd > -1 ? zlog_fd : STDERR_FILENO, buf, len);
 +}
-diff --git a/sapi/cgi/fpm/zlog.h b/sapi/cgi/fpm/zlog.h
-new file mode 100644
---- /dev/null
-+++ b/sapi/cgi/fpm/zlog.h
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/fpm/zlog.h php-5.2.17/sapi/cgi/fpm/zlog.h
+--- php-5.2.17.org/sapi/cgi/fpm/zlog.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/sapi/cgi/fpm/zlog.h	2021-10-23 19:09:19.833125073 +0200
 @@ -0,0 +1,34 @@
 +
 +	/* $Id$ */
diff --git a/php-m4-divert.patch b/php-m4-divert.patch
index f73206f..6f23b00 100644
--- a/php-m4-divert.patch
+++ b/php-m4-divert.patch
@@ -1,8 +1,8 @@
-diff -ur php-5.2.10.org/configure.in php-5.2.10/configure.in
---- php-5.2.10.org/configure.in	2009-06-17 14:22:41.000000000 +0200
-+++ php-5.2.10/configure.in	2009-08-18 12:16:25.317640253 +0200
+diff -urNp -x '*.orig' php-5.2.17.org/configure.in php-5.2.17/configure.in
+--- php-5.2.17.org/configure.in	2021-10-23 19:11:13.929791731 +0200
++++ php-5.2.17/configure.in	2021-10-23 19:11:16.436458398 +0200
 @@ -1,7 +1,7 @@
- ## $Id$ -*- autoconf -*-
+ ## $Id: configure.in 307193 2011-01-06 23:01:19Z iliaa $ -*- autoconf -*-
  dnl ## Process this file with autoconf to produce a configure script.
  
 -divert(1)
@@ -10,17 +10,17 @@ diff -ur php-5.2.10.org/configure.in php-5.2.10/configure.in
  
  dnl ## Diversion 1 is the autoconf + automake setup phase. We also
  dnl ## set the PHP version, deal with platform-specific compile
-@@ -263,7 +263,7 @@
- sinclude(TSRM/tsrm.m4)
+@@ -257,7 +257,7 @@ sinclude(TSRM/tsrm.m4)
  
+ sinclude(main/suhosin_patch.m4)
  
 -divert(2)
 +divert(1002)
  
  dnl ## Diversion 2 is where we set PHP-specific options and come up
  dnl ## with reasonable default values for them. We check for pthreads here
-@@ -302,7 +302,7 @@
-   PTHREADS_FLAGS
+@@ -302,7 +302,7 @@ if test "$PHP_FASTCGI" = "yes" -a "$PHP_
+   sinclude(sapi/cgi/fpm/config.m4)
  fi
  
 -divert(3)
@@ -28,7 +28,7 @@ diff -ur php-5.2.10.org/configure.in php-5.2.10/configure.in
  
  dnl ## In diversion 3 we check for compile-time options to the PHP
  dnl ## core and how to deal with different system dependencies.
-@@ -661,7 +661,7 @@
+@@ -662,7 +662,7 @@ if test "x$php_crypt_r" = "x1"; then
    PHP_CRYPT_R_STYLE
  fi
  
@@ -37,7 +37,7 @@ diff -ur php-5.2.10.org/configure.in php-5.2.10/configure.in
  
  dnl ## In diversion 4 we check user-configurable general settings.
  
-@@ -902,7 +902,7 @@
+@@ -903,7 +903,7 @@ else
    AC_MSG_RESULT([using system default])
  fi
  
@@ -46,18 +46,18 @@ diff -ur php-5.2.10.org/configure.in php-5.2.10/configure.in
  
  dnl ## In diversion 5 we check which extensions should be compiled.
  dnl ## All of these are normally in the extension directories.
-diff -ur php-5.2.10.org/ext/standard/config.m4 php-5.2.10/ext/standard/config.m4
---- php-5.2.10.org/ext/standard/config.m4	2007-07-11 13:56:03.000000000 +0200
-+++ php-5.2.10/ext/standard/config.m4	2009-08-18 12:16:25.317640253 +0200
+diff -urNp -x '*.orig' php-5.2.17.org/ext/standard/config.m4 php-5.2.17/ext/standard/config.m4
+--- php-5.2.17.org/ext/standard/config.m4	2009-11-28 00:41:13.000000000 +0100
++++ php-5.2.17/ext/standard/config.m4	2021-10-23 19:11:16.436458398 +0200
 @@ -1,6 +1,6 @@
- dnl $Id$ -*- autoconf -*-
+ dnl $Id: config.m4 291364 2009-11-27 23:41:13Z rasmus $ -*- autoconf -*-
  
 -divert(3)dnl
 +divert(1003)dnl
  
  dnl
  dnl Check if flush should be called explicitly after buffered io
-@@ -205,7 +205,7 @@
+@@ -205,7 +205,7 @@ dnl
  AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan)
  AC_FUNC_FNMATCH	
  
@@ -66,9 +66,9 @@ diff -ur php-5.2.10.org/ext/standard/config.m4 php-5.2.10/ext/standard/config.m4
  
  dnl
  dnl Check for regex library type
-diff -ur php-5.2.10.org/scripts/phpize.m4 php-5.2.10/scripts/phpize.m4
---- php-5.2.10.org/scripts/phpize.m4	2009-06-02 21:54:22.000000000 +0200
-+++ php-5.2.10/scripts/phpize.m4	2009-08-18 12:16:25.317640253 +0200
+diff -urNp -x '*.orig' php-5.2.17.org/scripts/phpize.m4 php-5.2.17/scripts/phpize.m4
+--- php-5.2.17.org/scripts/phpize.m4	2009-11-27 13:51:41.000000000 +0100
++++ php-5.2.17/scripts/phpize.m4	2021-10-23 19:11:16.436458398 +0200
 @@ -1,6 +1,6 @@
  dnl This file becomes configure.in for self-contained extensions.
  
diff --git a/php-mail.patch b/php-mail.patch
index c394bac..8066670 100644
--- a/php-mail.patch
+++ b/php-mail.patch
@@ -1,5 +1,6 @@
---- php-5.2.0/ext/standard/mail.c	2006-12-01 14:20:27.881416250 +0100
-+++ php-5.2.4/ext/standard/mail.c	2007-08-31 19:25:50.777713042 +0300
+diff -urNp -x '*.orig' php-5.2.17.org/ext/standard/mail.c php-5.2.17/ext/standard/mail.c
+--- php-5.2.17.org/ext/standard/mail.c	2010-07-19 15:38:53.000000000 +0200
++++ php-5.2.17/ext/standard/mail.c	2021-10-23 18:57:39.619791815 +0200
 @@ -21,6 +21,8 @@
  #include <stdlib.h>
  #include <ctype.h>
@@ -9,8 +10,8 @@
  #include "php.h"
  #include "ext/standard/info.h"
  
-@@ -35,6 +37,8 @@
- #include "php_ini.h"
+@@ -42,6 +44,8 @@
+ #include "php_string.h"
  #include "safe_mode.h"
  #include "exec.h"
 +#include "zend_operators.h"
@@ -18,8 +19,8 @@
  
  #ifdef PHP_WIN32
  #include "win32/sendmail.h"
-@@ -107,6 +111,18 @@
- 		return;
+@@ -131,6 +135,18 @@ PHP_FUNCTION(mail)
+ 		MAIL_ASCIIZ_CHECK(extra_cmd, extra_cmd_len);
  	}
  
 +    /* search for To: and Subject: headers which should be specified in proper mail() parameters, not in additional headers */
@@ -37,7 +38,7 @@
  	if (to_len > 0) {
  		to_r = estrndup(to, to_len);
  		for (; to_len; to_len--) {
-@@ -231,8 +247,42 @@
+@@ -276,8 +292,42 @@ PHPAPI int php_mail(char *to, char *subj
  			return 0;
  		}
  #endif
diff --git a/php-mysql-charsetphpini.patch b/php-mysql-charsetphpini.patch
index 0ef8304..930b3d9 100644
--- a/php-mysql-charsetphpini.patch
+++ b/php-mysql-charsetphpini.patch
@@ -1,7 +1,7 @@
-diff -aur php-5.2.5_p20080206.orig/ext/mysql/php_mysql.c php-5.2.5_p20080206/ext/mysql/php_mysql.c
---- php-5.2.5_p20080206.orig/ext/mysql/php_mysql.c	2008-02-06 14:22:57.652600900 +0100
-+++ php-5.2.5_p20080206/ext/mysql/php_mysql.c	2008-02-06 14:24:40.216655403 +0100
-@@ -360,6 +360,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/mysql/php_mysql.c php-5.2.17/ext/mysql/php_mysql.c
+--- php-5.2.17.org/ext/mysql/php_mysql.c	2010-08-21 18:19:30.000000000 +0200
++++ php-5.2.17/ext/mysql/php_mysql.c	2021-10-23 19:06:47.816458427 +0200
+@@ -360,6 +360,7 @@ PHP_INI_BEGIN()
  	PHP_INI_ENTRY("mysql.default_port",				NULL,	PHP_INI_ALL,		OnMySQLPort)
  	STD_PHP_INI_ENTRY("mysql.default_socket",		NULL,	PHP_INI_ALL,		OnUpdateStringUnempty,	default_socket,	zend_mysql_globals,		mysql_globals)
  	STD_PHP_INI_ENTRY("mysql.connect_timeout",		"60",	PHP_INI_ALL,		OnUpdateLong,		connect_timeout, 	zend_mysql_globals,		mysql_globals)
@@ -9,7 +9,7 @@ diff -aur php-5.2.5_p20080206.orig/ext/mysql/php_mysql.c php-5.2.5_p20080206/ext
  	STD_PHP_INI_BOOLEAN("mysql.trace_mode",			"0",	PHP_INI_ALL,		OnUpdateLong,		trace_mode, 		zend_mysql_globals,		mysql_globals)
  PHP_INI_END()
  /* }}} */
-@@ -376,6 +377,7 @@
+@@ -376,6 +377,7 @@ static PHP_GINIT_FUNCTION(mysql)
  	mysql_globals->connect_errno = 0;
  	mysql_globals->connect_error = NULL;
  	mysql_globals->connect_timeout = 0;
@@ -17,15 +17,15 @@ diff -aur php-5.2.5_p20080206.orig/ext/mysql/php_mysql.c php-5.2.5_p20080206/ext
  	mysql_globals->trace_mode = 0;
  	mysql_globals->result_allocated = 0;
  }
-@@ -515,6 +517,7 @@
+@@ -515,6 +517,7 @@ static void php_mysql_do_connect(INTERNA
  {
  	char *user=NULL, *passwd=NULL, *host_and_port=NULL, *socket=NULL, *tmp=NULL, *host=NULL;
  	int  user_len, passwd_len, host_len;
 +	char *connect_charset=NULL;
  	char *hashed_details=NULL;
  	int hashed_details_length, port = MYSQL_PORT;
- 	int client_flags = 0;
-@@ -527,6 +530,7 @@
+ 	long client_flags = 0;
+@@ -527,6 +530,7 @@ static void php_mysql_do_connect(INTERNA
  
  
  	connect_timeout = MySG(connect_timeout);
@@ -33,7 +33,7 @@ diff -aur php-5.2.5_p20080206.orig/ext/mysql/php_mysql.c php-5.2.5_p20080206/ext
  
  	socket = MySG(default_socket);
  
-@@ -640,6 +644,9 @@
+@@ -644,6 +648,9 @@ static void php_mysql_do_connect(INTERNA
  				mysql_options(&mysql->conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout);
  			}
  
@@ -43,7 +43,7 @@ diff -aur php-5.2.5_p20080206.orig/ext/mysql/php_mysql.c php-5.2.5_p20080206/ext
  			if (mysql_real_connect(&mysql->conn, host, user, passwd, NULL, port, socket, client_flags)==NULL) {
  #else
  			if (mysql_connect(&mysql->conn, host, user, passwd)==NULL) {
-@@ -684,6 +691,9 @@
+@@ -688,6 +695,9 @@ static void php_mysql_do_connect(INTERNA
  				signal(SIGPIPE, handler);
  #endif /* end mysql_ping */
  #if MYSQL_VERSION_ID > 32199 /* this lets us set the port number */
@@ -53,7 +53,7 @@ diff -aur php-5.2.5_p20080206.orig/ext/mysql/php_mysql.c php-5.2.5_p20080206/ext
  				if (mysql_real_connect(le->ptr, host, user, passwd, NULL, port, socket, client_flags)==NULL) {
  #else
  				if (mysql_connect(le->ptr, host, user, passwd)==NULL) {
-@@ -747,6 +757,9 @@
+@@ -751,6 +761,9 @@ static void php_mysql_do_connect(INTERNA
  			mysql_options(&mysql->conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout);
  		}
  
@@ -63,10 +63,10 @@ diff -aur php-5.2.5_p20080206.orig/ext/mysql/php_mysql.c php-5.2.5_p20080206/ext
  		if (mysql_real_connect(&mysql->conn, host, user, passwd, NULL, port, socket, client_flags)==NULL) {
  #else
  		if (mysql_connect(&mysql->conn, host, user, passwd)==NULL) {
-diff -aur php-5.2.5_p20080206.orig/ext/mysql/php_mysql_structs.h php-5.2.5_p20080206/ext/mysql/php_mysql_structs.h
---- php-5.2.5_p20080206.orig/ext/mysql/php_mysql_structs.h	2008-02-06 14:22:57.510605687 +0100
-+++ php-5.2.5_p20080206/ext/mysql/php_mysql_structs.h	2008-02-06 14:23:27.764590355 +0100
-@@ -103,6 +103,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/mysql/php_mysql_structs.h php-5.2.17/ext/mysql/php_mysql_structs.h
+--- php-5.2.17.org/ext/mysql/php_mysql_structs.h	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/ext/mysql/php_mysql_structs.h	2021-10-23 19:06:47.816458427 +0200
+@@ -103,6 +103,7 @@ ZEND_BEGIN_MODULE_GLOBALS(mysql)
  	long default_port;
  	char *default_host, *default_user, *default_password;
  	char *default_socket;
diff --git a/php-mysqli-charsetphpini.patch b/php-mysqli-charsetphpini.patch
index edf4df9..95e7eb6 100644
--- a/php-mysqli-charsetphpini.patch
+++ b/php-mysqli-charsetphpini.patch
@@ -1,6 +1,26 @@
---- ext/mysqli/mysqli_api.c	2006-12-01 16:30:36.000000000 +0100
-+++ ext/mysqli/mysqli_api.c	2006-12-01 16:39:32.000000000 +0100
-@@ -1395,7 +1395,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/mysqli/mysqli.c php-5.2.17/ext/mysqli/mysqli.c
+--- php-5.2.17.org/ext/mysqli/mysqli.c	2010-08-13 12:43:15.000000000 +0200
++++ php-5.2.17/ext/mysqli/mysqli.c	2021-10-23 19:07:32.689791758 +0200
+@@ -451,6 +451,7 @@ PHP_INI_BEGIN()
+ 	STD_PHP_INI_ENTRY("mysqli.default_pw",				NULL,	PHP_INI_ALL,		OnUpdateString,		default_pw,			zend_mysqli_globals,		mysqli_globals)
+ 	STD_PHP_INI_ENTRY("mysqli.default_port",			"3306",	PHP_INI_ALL,		OnUpdateLong,		default_port,		zend_mysqli_globals,		mysqli_globals)
+ 	STD_PHP_INI_ENTRY("mysqli.default_socket",			NULL,	PHP_INI_ALL,		OnUpdateStringUnempty,	default_socket,	zend_mysqli_globals,		mysqli_globals)
++	STD_PHP_INI_ENTRY("mysqli.connect_charset",			NULL,	PHP_INI_ALL,		OnUpdateString,		connect_charset,	zend_mysqli_globals,		mysqli_globals)
+ 	STD_PHP_INI_BOOLEAN("mysqli.reconnect",				"0",	PHP_INI_SYSTEM,		OnUpdateLong,		reconnect,			zend_mysqli_globals,		mysqli_globals)
+ PHP_INI_END()
+ 
+@@ -467,6 +468,7 @@ static PHP_GINIT_FUNCTION(mysqli)
+ 	mysqli_globals->default_user = NULL;
+ 	mysqli_globals->default_pw = NULL;
+ 	mysqli_globals->default_socket = NULL;
++	mysqli_globals->connect_charset = NULL;
+ 	mysqli_globals->reconnect = 0;
+ 	mysqli_globals->report_mode = 0;
+ 	mysqli_globals->report_ht = 0;
+diff -urNp -x '*.orig' php-5.2.17.org/ext/mysqli/mysqli_api.c php-5.2.17/ext/mysqli/mysqli_api.c
+--- php-5.2.17.org/ext/mysqli/mysqli_api.c	2021-10-23 19:07:30.269791758 +0200
++++ php-5.2.17/ext/mysqli/mysqli_api.c	2021-10-23 19:07:32.689791758 +0200
+@@ -1428,7 +1428,7 @@ PHP_FUNCTION(mysqli_prepare)
  PHP_FUNCTION(mysqli_real_connect)
  {
  	MY_MYSQL 		*mysql;
@@ -9,7 +29,7 @@
  	unsigned int 	hostname_len = 0, username_len = 0, passwd_len = 0, dbname_len = 0, socket_len = 0;
  	unsigned long 	port=0, flags=0;
  	zval			*mysql_link;
-@@ -1436,6 +1436,12 @@
+@@ -1478,6 +1478,12 @@ PHP_FUNCTION(mysqli_real_connect)
  		socket = MyG(default_socket);
  	}
  
@@ -22,36 +42,19 @@
  	if (mysql_real_connect(mysql->mysql,hostname,username,passwd,dbname,port,socket,flags) == NULL) {
  		php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql) TSRMLS_CC);
  		php_mysqli_throw_sql_exception( mysql->mysql->net.sqlstate, mysql->mysql->net.last_errno TSRMLS_CC,
---- ext/mysqli/mysqli.c	2006-12-01 16:30:36.000000000 +0100
-+++ ext/mysqli/mysqli.c	2006-12-01 16:38:01.000000000 +0100
-@@ -459,6 +459,7 @@
- 	STD_PHP_INI_ENTRY("mysqli.default_pw",				NULL,	PHP_INI_ALL,		OnUpdateString,		default_pw,			zend_mysqli_globals,		mysqli_globals)
- 	STD_PHP_INI_ENTRY("mysqli.default_port",			"3306",	PHP_INI_ALL,		OnUpdateLong,		default_port,		zend_mysqli_globals,		mysqli_globals)
- 	STD_PHP_INI_ENTRY("mysqli.default_socket",			NULL,	PHP_INI_ALL,		OnUpdateStringUnempty,	default_socket,	zend_mysqli_globals,		mysqli_globals)
-+	STD_PHP_INI_ENTRY("mysqli.connect_charset",			NULL,	PHP_INI_ALL,		OnUpdateString,		connect_charset,	zend_mysqli_globals,		mysqli_globals)
- 	STD_PHP_INI_BOOLEAN("mysqli.reconnect",				"0",	PHP_INI_SYSTEM,		OnUpdateLong,		reconnect,			zend_mysqli_globals,		mysqli_globals)
- PHP_INI_END()
- 
-@@ -475,6 +476,7 @@
- 	mysqli_globals->default_user = NULL;
- 	mysqli_globals->default_pw = NULL;
- 	mysqli_globals->default_socket = NULL;
-+	mysqli_globals->connect_charset = NULL;
- 	mysqli_globals->reconnect = 0;
- 	mysqli_globals->report_mode = 0;
- 	mysqli_globals->report_ht = 0;
---- ext/mysqli/mysqli_nonapi.c	2006-12-01 16:30:36.000000000 +0100
-+++ ext/mysqli/mysqli_nonapi.c	2006-12-01 16:40:29.000000000 +0100
-@@ -36,7 +36,7 @@
- 	MY_MYSQL 			*mysql;
- 	MYSQLI_RESOURCE 	*mysqli_resource;
+diff -urNp -x '*.orig' php-5.2.17.org/ext/mysqli/mysqli_nonapi.c php-5.2.17/ext/mysqli/mysqli_nonapi.c
+--- php-5.2.17.org/ext/mysqli/mysqli_nonapi.c	2010-01-25 14:23:32.000000000 +0100
++++ php-5.2.17/ext/mysqli/mysqli_nonapi.c	2021-10-23 19:07:32.689791758 +0200
+@@ -36,7 +36,7 @@ PHP_FUNCTION(mysqli_connect)
+ 	MY_MYSQL 			*mysql = NULL;
+ 	MYSQLI_RESOURCE 	*mysqli_resource = NULL;
  	zval  				*object = getThis();
 -	char 				*hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL;
 +	char 				*hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL, *connect_charset=NULL;
  	unsigned int 		hostname_len = 0, username_len = 0, passwd_len = 0, dbname_len = 0, socket_len = 0;
  	long				port=0;
  
-@@ -88,6 +88,12 @@
+@@ -116,6 +116,12 @@ PHP_FUNCTION(mysqli_connect)
  		socket = MyG(default_socket);
  	}
  
@@ -64,9 +67,10 @@
  	if (mysql_real_connect(mysql->mysql,hostname,username,passwd,dbname,port,socket,CLIENT_MULTI_RESULTS) == NULL) {
  		/* Save error messages */
  
---- ext/mysqli/php_mysqli.h	2006-12-01 16:30:36.000000000 +0100
-+++ ext/mysqli/php_mysqli.h	2006-12-01 16:36:23.000000000 +0100
-@@ -433,6 +433,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/mysqli/php_mysqli.h php-5.2.17/ext/mysqli/php_mysqli.h
+--- php-5.2.17.org/ext/mysqli/php_mysqli.h	2010-01-25 14:23:32.000000000 +0100
++++ php-5.2.17/ext/mysqli/php_mysqli.h	2021-10-23 19:07:32.689791758 +0200
+@@ -442,6 +442,7 @@ ZEND_BEGIN_MODULE_GLOBALS(mysqli)
  	char			*default_user;
  	char			*default_socket;
  	char            *default_pw;
diff --git a/php-no-metaccld.patch b/php-no-metaccld.patch
index ed13c2c..d4da4c8 100644
--- a/php-no-metaccld.patch
+++ b/php-no-metaccld.patch
@@ -1,8 +1,9 @@
---- php-5.2.7/configure.in~	2008-12-05 12:58:17.000000000 +0200
-+++ php-5.2.7/configure.in	2008-12-05 13:00:02.247644045 +0200
-@@ -1053,19 +1053,6 @@
- PHP_SUBST_OLD(YACC)
- PHP_SUBST_OLD(SHLIB_SUFFIX_NAME)
+diff -urNp -x '*.orig' php-5.2.17.org/configure.in php-5.2.17/configure.in
+--- php-5.2.17.org/configure.in	2021-10-23 18:58:29.039791808 +0200
++++ php-5.2.17/configure.in	2021-10-23 18:58:31.346458475 +0200
+@@ -1277,19 +1277,6 @@ PHP_SUBST(PHP_FRAMEWORKS)
+ PHP_SUBST(PHP_FRAMEWORKPATH)
+ PHP_SUBST(INSTALL_HEADERS)
  
 -old_CC=$CC
 -
@@ -20,7 +21,7 @@
  dnl This will go away, if we have a facility to run per-extension code
  dnl after the thread_safety decision was done
  if test "$PHP_THREAD_SAFETY" = "yes" && test "$PHP_MYSQL" = "yes"; then
-@@ -1310,8 +1310,6 @@
+@@ -1345,8 +1332,6 @@ test -z "$PHP_COMPILE" && PHP_COMPILE='$
  test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $<'
  SHARED_LIBTOOL='$(LIBTOOL)'
  
diff --git a/php-pldlogo.patch b/php-pldlogo.patch
index 2b67aac..9a8d4b2 100644
--- a/php-pldlogo.patch
+++ b/php-pldlogo.patch
@@ -1,8 +1,9 @@
---- php-4.3.3RC3/ext/standard/info.c.orig	2003-06-19 18:43:41.000000000 +0200
-+++ php-4.3.3RC3/ext/standard/info.c	2003-08-16 21:37:18.705836072 +0200
-@@ -518,6 +518,21 @@
- 		PUTS(!sapi_module.phpinfo_as_text?"<br />":"\n");
- 		PUTS(zend_version);
+diff -urNp -x '*.orig' php-5.2.17.org/ext/standard/info.c php-5.2.17/ext/standard/info.c
+--- php-5.2.17.org/ext/standard/info.c	2021-10-23 18:56:50.643125149 +0200
++++ php-5.2.17/ext/standard/info.c	2021-10-23 18:56:53.006458482 +0200
+@@ -667,6 +667,21 @@ PHPAPI void php_print_info(int flag TSRM
+ 			zend_html_puts(zend_version, strlen(zend_version) TSRMLS_CC);
+ 		}
  		php_info_print_box_end();
 +		/* PLD Linux */
 +		php_info_print_box_start(0);
@@ -22,21 +23,24 @@
  		efree(php_uname);
  	}
  
-diff -urN php-4.2.1RC2.org/ext/standard/info.h php-4.2.1RC2/ext/standard/info.h
---- php-4.2.1RC2.org/ext/standard/info.h	Sat May 11 20:49:24 2002
-+++ php-4.2.1RC2/ext/standard/info.h	Sat May 11 20:49:40 2002
+diff -urNp -x '*.orig' php-5.2.17.org/ext/standard/info.h php-5.2.17/ext/standard/info.h
+--- php-5.2.17.org/ext/standard/info.h	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/ext/standard/info.h	2021-10-23 18:56:53.006458482 +0200
 @@ -54,6 +54,7 @@
  #define PHP_EGG_LOGO_GUID	"PHPE9568F36-D428-11d2-A769-00AA001ACF42"
  #define ZEND_LOGO_GUID		"PHPE9568F35-D428-11d2-A769-00AA001ACF42"
  #define PHP_CREDITS_GUID  "PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000"
 +#define PLD_LOGO_GUID	"PHPE9568F40-D428-11d2-A769-00AA001ACF42"
  
+ BEGIN_EXTERN_C()
  PHP_FUNCTION(phpversion);
- PHP_FUNCTION(phpinfo);
---- php-4.3.0.org/main/logos.h	Sat May 11 20:49:24 2002
-+++ php-4.3.0/main/logos.h	Sat May 11 20:50:32 2002
-@@ -1503,1 +1503,127 @@
- 	249, 249, 207, 233,   5,   4,   0,  59 };
+diff -urNp -x '*.orig' php-5.2.17.org/main/logos.h php-5.2.17/main/logos.h
+--- php-5.2.17.org/main/logos.h	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/main/logos.h	2021-10-23 18:56:53.006458482 +0200
+@@ -874,3 +874,129 @@ static const unsigned char php_egg_logo[
+ 	  7,   4, 129,   5,  84, 208,  62, 158, 185, 154, 
+ 	  8, 177,   5,  80, 208, 153, 172,  25, 155, 178, 
+ 	 57, 155, 180,  41, 148,   1,   1,   0,  59,   0 };
 +
 +
 +unsigned char pld_logo[] = {
@@ -163,10 +167,10 @@ diff -urN php-4.2.1RC2.org/ext/standard/info.h php-4.2.1RC2/ext/standard/info.h
 + 	  0,   0, 218,  35,  72, 230, 144,   1,  81,  42,
 + 	  0,   0,   0,   0,  73,  69,  78,  68, 174,  66,
 + 	 96, 130 };
-diff -urN php-4.2.1RC2.org/main/php_logos.c php-4.2.1RC2/main/php_logos.c
---- php-4.2.1RC2.org/main/php_logos.c	Sat May 11 20:49:24 2002
-+++ php-4.2.1RC2/main/php_logos.c	Sat May 11 20:51:05 2002
-@@ -56,6 +56,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/main/php_logos.c php-5.2.17/main/php_logos.c
+--- php-5.2.17.org/main/php_logos.c	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/main/php_logos.c	2021-10-23 18:56:53.009791815 +0200
+@@ -58,6 +58,7 @@ int php_init_info_logos(void)
  	php_register_info_logo(PHP_LOGO_GUID    , "image/gif", php_logo    , sizeof(php_logo));
  	php_register_info_logo(PHP_EGG_LOGO_GUID, "image/gif", php_egg_logo, sizeof(php_egg_logo));
  	php_register_info_logo(ZEND_LOGO_GUID   , "image/gif", zend_logo   , sizeof(zend_logo));
diff --git a/php-secbug-67498.patch b/php-secbug-67498.patch
index 2ee2721..a5bc17f 100644
--- a/php-secbug-67498.patch
+++ b/php-secbug-67498.patch
@@ -4,11 +4,10 @@ Date:   Mon Jun 23 00:19:37 2014 -0700
 
     Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability
 
-diff --git a/ext/standard/info.c b/ext/standard/info.c
-index 70b2e2f..0f15bbe 100644
---- a/ext/standard/info.c
-+++ b/ext/standard/info.c
-@@ -875,16 +875,16 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
+diff -urNp -x '*.orig' php-5.2.17.org/ext/standard/info.c php-5.2.17/ext/standard/info.c
+--- php-5.2.17.org/ext/standard/info.c	2021-10-23 19:14:45.793125049 +0200
++++ php-5.2.17/ext/standard/info.c	2021-10-23 19:14:48.309791715 +0200
+@@ -780,16 +780,16 @@ PHPAPI void php_print_info(int flag TSRM
  
  		php_info_print_table_start();
  		php_info_print_table_header(2, "Variable", "Value");
@@ -28,12 +27,10 @@ index 70b2e2f..0f15bbe 100644
 +		if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_PW", sizeof("PHP_AUTH_PW"), (void **) &data) != FAILURE && Z_TYPE_PP(data) == IS_STRING) {
  			php_info_print_table_row(2, "PHP_AUTH_PW", Z_STRVAL_PP(data));
  		}
- 		php_print_gpcse_array(ZEND_STRL("_REQUEST") TSRMLS_CC);
-diff --git a/ext/standard/tests/general_functions/bug67498.phpt b/ext/standard/tests/general_functions/bug67498.phpt
-new file mode 100644
-index 0000000..5b5951b
---- /dev/null
-+++ b/ext/standard/tests/general_functions/bug67498.phpt
+ 		php_print_gpcse_array("_REQUEST", sizeof("_REQUEST")-1 TSRMLS_CC);
+diff -urNp -x '*.orig' php-5.2.17.org/ext/standard/tests/general_functions/bug67498.phpt php-5.2.17/ext/standard/tests/general_functions/bug67498.phpt
+--- php-5.2.17.org/ext/standard/tests/general_functions/bug67498.phpt	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/ext/standard/tests/general_functions/bug67498.phpt	2021-10-23 19:14:48.309791715 +0200
 @@ -0,0 +1,15 @@
 +--TEST--
 +phpinfo() Type Confusion Information Leak Vulnerability
diff --git a/php-shared.patch b/php-shared.patch
index 04b547b..104fc39 100644
--- a/php-shared.patch
+++ b/php-shared.patch
@@ -1,8 +1,9 @@
---- php-5.2.4/Makefile.global~	2007-08-31 19:13:58.000000000 +0300
-+++ php-5.2.4/Makefile.global	2007-08-31 19:19:33.799017413 +0300
-@@ -13,8 +13,12 @@
+diff -urNp -x '*.orig' php-5.2.17.org/Makefile.global php-5.2.17/Makefile.global
+--- php-5.2.17.org/Makefile.global	2009-11-18 18:52:22.000000000 +0100
++++ php-5.2.17/Makefile.global	2021-10-23 18:55:16.136458501 +0200
+@@ -13,8 +13,12 @@ all: $(all_targets)
  	
- build-modules: $(PHP_MODULES)
+ build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
  
 -libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
 -	$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
@@ -15,7 +16,7 @@
  	-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
  
  libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
-@@ -25,10 +29,10 @@
+@@ -25,10 +29,10 @@ install: $(all_targets) $(install_target
  install-sapi: $(OVERALL_TARGET)
  	@echo "Installing PHP SAPI module:       $(PHP_SAPI)"
  	-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
@@ -29,9 +30,17 @@
  				break; \
  			fi; \
  		done; \
---- php-5.0.0.org/sapi/cgi/config9.m4	2004-07-25 22:41:53.698171496 +0200
-+++ php-5.0.0/sapi/cgi/config9.m4	2004-07-25 22:42:04.894469400 +0200
-@@ -156,7 +156,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/Makefile.frag php-5.2.17/sapi/cgi/Makefile.frag
+--- php-5.2.17.org/sapi/cgi/Makefile.frag	2003-07-02 03:08:26.000000000 +0200
++++ php-5.2.17/sapi/cgi/Makefile.frag	2021-10-23 18:55:16.136458501 +0200
+@@ -1,2 +1,2 @@
+-$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
++$(SAPI_CGI_PATH): libphp_common.la $(PHP_SAPI_OBJS)
+ 	$(BUILD_CGI)
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/config9.m4 php-5.2.17/sapi/cgi/config9.m4
+--- php-5.2.17.org/sapi/cgi/config9.m4	2007-07-12 01:20:37.000000000 +0200
++++ php-5.2.17/sapi/cgi/config9.m4	2021-10-23 18:55:16.136458501 +0200
+@@ -96,7 +96,7 @@ if test "$PHP_SAPI" = "default"; then
          BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
        ;;
        *)
@@ -40,25 +49,9 @@
        ;;
      esac
  
---- php-5.0.0.org/sapi/cgi/Makefile.frag	2004-07-25 22:41:53.696171800 +0200
-+++ php-5.0.0/sapi/cgi/Makefile.frag	2004-07-25 22:42:04.895469248 +0200
-@@ -1,2 +1,2 @@
--$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
-+$(SAPI_CGI_PATH): libphp_common.la $(PHP_SAPI_OBJS)
- 	$(BUILD_CGI)
---- php-5.0.0.org/sapi/cli/config.m4	2004-07-25 22:41:53.700171192 +0200
-+++ php-5.0.0/sapi/cli/config.m4	2004-07-25 22:42:04.895469248 +0200
-@@ -27,7 +27,7 @@
-     BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
-     ;;
-   *)
--    BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
-+    BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) libphp_common.la \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
-     ;;
-   esac
-   INSTALL_CLI="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(bindir); \$(INSTALL) -m 0755 \$(SAPI_CLI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)"
---- php-5.0.0.org/sapi/cli/Makefile.frag	2004-07-25 22:41:53.699171344 +0200
-+++ php-5.0.0/sapi/cli/Makefile.frag	2004-07-25 22:42:04.896469096 +0200
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cli/Makefile.frag php-5.2.17/sapi/cli/Makefile.frag
+--- php-5.2.17.org/sapi/cli/Makefile.frag	2005-10-13 12:02:59.000000000 +0200
++++ php-5.2.17/sapi/cli/Makefile.frag	2021-10-23 18:55:16.136458501 +0200
 @@ -1,6 +1,6 @@
  cli: $(SAPI_CLI_PATH)
  
@@ -67,3 +60,15 @@
  	$(BUILD_CLI)
  
  install-cli: $(SAPI_CLI_PATH)
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cli/config.m4 php-5.2.17/sapi/cli/config.m4
+--- php-5.2.17.org/sapi/cli/config.m4	2008-09-01 15:15:15.000000000 +0200
++++ php-5.2.17/sapi/cli/config.m4	2021-10-23 18:55:16.136458501 +0200
+@@ -27,7 +27,7 @@ if test "$PHP_CLI" != "no"; then
+     BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -Lnetware -lphp5lib -o \$(SAPI_CLI_PATH)"
+     ;;
+   *)
+-    BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
++    BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) libphp_common.la \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
+     ;;
+   esac
+   INSTALL_CLI="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(bindir); \$(INSTALL) -m 0755 \$(SAPI_CLI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)\$(EXEEXT)"
diff --git a/php-uint32_t.patch b/php-uint32_t.patch
index 5bd1bf0..25689cb 100644
--- a/php-uint32_t.patch
+++ b/php-uint32_t.patch
@@ -1,12 +1,13 @@
 adds missing include in zend_strtod.c (caused build to fail on sparc)
 
---- php-5.0.3/Zend/zend_strtod.c~	2004-12-14 09:41:35.000000000 +0100
-+++ php-5.0.3/Zend/zend_strtod.c	2004-12-21 08:45:10.050119856 +0100
-@@ -90,6 +90,7 @@
-  */
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/zend_strtod.c php-5.2.17/Zend/zend_strtod.c
+--- php-5.2.17.org/Zend/zend_strtod.c	2011-01-06 23:48:20.000000000 +0100
++++ php-5.2.17/Zend/zend_strtod.c	2021-10-23 19:00:05.466458470 +0200
+@@ -93,6 +93,7 @@
  
+ #include <zend_operators.h>
  #include <zend_strtod.h>
 +#include <stdint.h>
  
- #if defined(LIBC_SCCS) && !defined(lint)
- static char *rcsid = "$OpenBSD: strtod.c,v 1.19 2004/02/03 16:52:11 drahn Exp $";
+ #ifdef ZTS
+ #include <TSRM.h>
diff --git a/php-zlib-for-getimagesize.patch b/php-zlib-for-getimagesize.patch
index 9a2bc9d..ddd001d 100644
--- a/php-zlib-for-getimagesize.patch
+++ b/php-zlib-for-getimagesize.patch
@@ -2,8 +2,9 @@ make compressed .swf parsing possible,
 link core php with -lz for getimagesize()
 see also http://bugs.php.net/bug.php?id=29611
 
---- php-4.4.1/ext/standard/image.c	2005-07-27 14:22:36.000000000 +0300
-+++ /tmp/image.c	2006-01-06 19:14:00.000000000 +0200
+diff -urNp -x '*.orig' php-5.2.17.org/ext/standard/image.c php-5.2.17/ext/standard/image.c
+--- php-5.2.17.org/ext/standard/image.c	2010-06-30 14:21:35.000000000 +0200
++++ php-5.2.17/ext/standard/image.c	2021-10-23 19:03:39.443125109 +0200
 @@ -31,7 +31,7 @@
  #endif
  #include "php_image.h"
@@ -13,7 +14,7 @@ see also http://bugs.php.net/bug.php?id=29611
  #include "zlib.h"
  #endif
  
-@@ -80,7 +80,7 @@
+@@ -80,7 +80,7 @@ PHP_MINIT_FUNCTION(imagetypes)
  	REGISTER_LONG_CONSTANT("IMAGETYPE_JP2",     IMAGE_FILETYPE_JP2,     CONST_CS | CONST_PERSISTENT);
  	REGISTER_LONG_CONSTANT("IMAGETYPE_JPX",     IMAGE_FILETYPE_JPX,     CONST_CS | CONST_PERSISTENT);
  	REGISTER_LONG_CONSTANT("IMAGETYPE_JB2",     IMAGE_FILETYPE_JB2,     CONST_CS | CONST_PERSISTENT);
@@ -22,7 +23,7 @@ see also http://bugs.php.net/bug.php?id=29611
  	REGISTER_LONG_CONSTANT("IMAGETYPE_SWC",     IMAGE_FILETYPE_SWC,     CONST_CS | CONST_PERSISTENT);
  #endif	
  	REGISTER_LONG_CONSTANT("IMAGETYPE_IFF",     IMAGE_FILETYPE_IFF,     CONST_CS | CONST_PERSISTENT);
-@@ -184,7 +184,7 @@
+@@ -184,7 +184,7 @@ static unsigned long int php_swf_get_bit
  }
  /* }}} */
  
@@ -31,7 +32,7 @@ see also http://bugs.php.net/bug.php?id=29611
  /* {{{ php_handle_swc
   */
  static struct gfxinfo *php_handle_swc(php_stream * stream TSRMLS_DC)
-@@ -1267,7 +1290,7 @@
+@@ -1309,7 +1309,7 @@ PHP_FUNCTION(getimagesize)
  			result = php_handle_swf(stream TSRMLS_CC);
  			break;
  		case IMAGE_FILETYPE_SWC:
@@ -39,4 +40,4 @@ see also http://bugs.php.net/bug.php?id=29611
 +#if HAVE_ZLIB
  			result = php_handle_swc(stream TSRMLS_CC);
  #else
- 			php_error_docref(NULL TSRMLS_CC, E_NOTICE, "The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled.");
+ 			php_error_docref(NULL TSRMLS_CC, E_NOTICE, "The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled");
diff --git a/suhosin.patch b/suhosin.patch
index 75936f4..cdb1379 100644
--- a/suhosin.patch
+++ b/suhosin.patch
@@ -1,7 +1,7 @@
-diff -Nura php-5.2.9/TSRM/TSRM.h suhosin-patch-5.2.9-0.9.7/TSRM/TSRM.h
---- php-5.2.9/TSRM/TSRM.h	2008-12-31 12:17:31.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/TSRM/TSRM.h	2009-03-05 21:11:35.000000000 +0100
-@@ -38,6 +38,13 @@
+diff -urNp -x '*.orig' php-5.2.17.org/TSRM/TSRM.h php-5.2.17/TSRM/TSRM.h
+--- php-5.2.17.org/TSRM/TSRM.h	2008-12-31 12:17:49.000000000 +0100
++++ php-5.2.17/TSRM/TSRM.h	2021-10-23 19:10:37.403125065 +0200
+@@ -38,6 +38,13 @@ typedef long tsrm_intptr_t;
  typedef unsigned long tsrm_uintptr_t;
  #endif
  
@@ -15,7 +15,7 @@ diff -Nura php-5.2.9/TSRM/TSRM.h suhosin-patch-5.2.9-0.9.7/TSRM/TSRM.h
  /* Only compile multi-threading functions if we're in ZTS mode */
  #ifdef ZTS
  
-@@ -93,6 +100,7 @@
+@@ -93,6 +100,7 @@ typedef void (*ts_allocate_dtor)(void *,
  
  #define THREAD_HASH_OF(thr,ts)  (unsigned long)thr%(unsigned long)ts
  
@@ -23,10 +23,10 @@ diff -Nura php-5.2.9/TSRM/TSRM.h suhosin-patch-5.2.9-0.9.7/TSRM/TSRM.h
  #ifdef __cplusplus
  extern "C" {
  #endif
-diff -Nura php-5.2.9/TSRM/tsrm_virtual_cwd.c suhosin-patch-5.2.9-0.9.7/TSRM/tsrm_virtual_cwd.c
---- php-5.2.9/TSRM/tsrm_virtual_cwd.c	2008-12-31 12:17:31.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/TSRM/tsrm_virtual_cwd.c	2009-03-05 21:37:36.000000000 +0100
-@@ -273,6 +273,191 @@
+diff -urNp -x '*.orig' php-5.2.17.org/TSRM/tsrm_virtual_cwd.c php-5.2.17/TSRM/tsrm_virtual_cwd.c
+--- php-5.2.17.org/TSRM/tsrm_virtual_cwd.c	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/TSRM/tsrm_virtual_cwd.c	2021-10-23 19:10:37.403125065 +0200
+@@ -273,6 +273,191 @@ static char *tsrm_strndup(const char *s,
  }
  /* }}} */
  
@@ -218,10 +218,10 @@ diff -Nura php-5.2.9/TSRM/tsrm_virtual_cwd.c suhosin-patch-5.2.9-0.9.7/TSRM/tsrm
  CWD_API void virtual_cwd_startup(void) /* {{{ */
  {
  	char cwd[MAXPATHLEN];
-diff -Nura php-5.2.9/TSRM/tsrm_virtual_cwd.h suhosin-patch-5.2.9-0.9.7/TSRM/tsrm_virtual_cwd.h
---- php-5.2.9/TSRM/tsrm_virtual_cwd.h	2008-12-31 12:17:32.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/TSRM/tsrm_virtual_cwd.h	2009-03-05 21:11:35.000000000 +0100
-@@ -139,6 +139,22 @@
+diff -urNp -x '*.orig' php-5.2.17.org/TSRM/tsrm_virtual_cwd.h php-5.2.17/TSRM/tsrm_virtual_cwd.h
+--- php-5.2.17.org/TSRM/tsrm_virtual_cwd.h	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/TSRM/tsrm_virtual_cwd.h	2021-10-23 19:10:37.406458398 +0200
+@@ -139,6 +139,22 @@ typedef struct _cwd_state {
  
  typedef int (*verify_path_func)(const cwd_state *);
  
@@ -244,10 +244,10 @@ diff -Nura php-5.2.9/TSRM/tsrm_virtual_cwd.h suhosin-patch-5.2.9-0.9.7/TSRM/tsrm
  CWD_API void virtual_cwd_startup(void);
  CWD_API void virtual_cwd_shutdown(void);
  CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC);
-diff -Nura php-5.2.9/Zend/Makefile.am suhosin-patch-5.2.9-0.9.7/Zend/Makefile.am
---- php-5.2.9/Zend/Makefile.am	2006-12-05 09:07:57.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/Makefile.am	2009-03-05 21:11:35.000000000 +0100
-@@ -17,7 +17,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/Makefile.am php-5.2.17/Zend/Makefile.am
+--- php-5.2.17.org/Zend/Makefile.am	2006-12-05 09:07:57.000000000 +0100
++++ php-5.2.17/Zend/Makefile.am	2021-10-23 19:10:37.406458398 +0200
+@@ -17,7 +17,7 @@ libZend_la_SOURCES=\
  	zend_objects_API.c zend_ts_hash.c zend_stream.c \
  	zend_default_classes.c \
  	zend_iterators.c zend_interfaces.c zend_exceptions.c \
@@ -256,10 +256,10 @@ diff -Nura php-5.2.9/Zend/Makefile.am suhosin-patch-5.2.9-0.9.7/Zend/Makefile.am
  
  libZend_la_LDFLAGS =
  libZend_la_LIBADD = @ZEND_EXTRA_LIBS@
-diff -Nura php-5.2.9/Zend/Zend.dsp suhosin-patch-5.2.9-0.9.7/Zend/Zend.dsp
---- php-5.2.9/Zend/Zend.dsp	2006-12-05 09:07:57.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/Zend.dsp	2009-03-05 21:15:17.000000000 +0100
-@@ -239,6 +239,10 @@
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/Zend.dsp php-5.2.17/Zend/Zend.dsp
+--- php-5.2.17.org/Zend/Zend.dsp	2021-10-23 19:10:34.989791732 +0200
++++ php-5.2.17/Zend/Zend.dsp	2021-10-23 19:10:37.406458398 +0200
+@@ -239,6 +239,10 @@ SOURCE=.\zend_strtod.c
  # End Source File
  # Begin Source File
  
@@ -270,10 +270,10 @@ diff -Nura php-5.2.9/Zend/Zend.dsp suhosin-patch-5.2.9-0.9.7/Zend/Zend.dsp
  SOURCE=.\zend_ts_hash.c
  # End Source File
  # Begin Source File
-diff -Nura php-5.2.9/Zend/ZendTS.dsp suhosin-patch-5.2.9-0.9.7/Zend/ZendTS.dsp
---- php-5.2.9/Zend/ZendTS.dsp	2006-12-05 09:07:57.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/ZendTS.dsp	2009-03-05 21:15:17.000000000 +0100
-@@ -273,6 +273,10 @@
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/ZendTS.dsp php-5.2.17/Zend/ZendTS.dsp
+--- php-5.2.17.org/Zend/ZendTS.dsp	2021-10-23 19:10:34.989791732 +0200
++++ php-5.2.17/Zend/ZendTS.dsp	2021-10-23 19:10:37.406458398 +0200
+@@ -273,6 +273,10 @@ SOURCE=.\zend_strtod.c
  # End Source File
  # Begin Source File
  
@@ -284,10 +284,10 @@ diff -Nura php-5.2.9/Zend/ZendTS.dsp suhosin-patch-5.2.9-0.9.7/Zend/ZendTS.dsp
  SOURCE=.\zend_ts_hash.c
  # End Source File
  # Begin Source File
-diff -Nura php-5.2.9/Zend/zend.c suhosin-patch-5.2.9-0.9.7/Zend/zend.c
---- php-5.2.9/Zend/zend.c	2008-12-31 12:17:32.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/zend.c	2009-03-05 21:11:35.000000000 +0100
-@@ -57,7 +57,9 @@
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/zend.c php-5.2.17/Zend/zend.c
+--- php-5.2.17.org/Zend/zend.c	2010-01-05 21:46:53.000000000 +0100
++++ php-5.2.17/Zend/zend.c	2021-10-23 19:10:37.406458398 +0200
+@@ -57,7 +57,9 @@ ZEND_API void (*zend_ticks_function)(int
  ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
  int (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap);
  ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC);
@@ -298,7 +298,7 @@ diff -Nura php-5.2.9/Zend/zend.c suhosin-patch-5.2.9-0.9.7/Zend/zend.c
  void (*zend_on_timeout)(int seconds TSRMLS_DC);
  
  static void (*zend_message_dispatcher_p)(long message, void *data);
-@@ -74,9 +76,88 @@
+@@ -74,9 +76,88 @@ static ZEND_INI_MH(OnUpdateErrorReportin
  	return SUCCESS;
  }
  
@@ -387,10 +387,10 @@ diff -Nura php-5.2.9/Zend/zend.c suhosin-patch-5.2.9-0.9.7/Zend/zend.c
  	STD_ZEND_INI_BOOLEAN("zend.ze1_compatibility_mode",	"0",	ZEND_INI_ALL,		OnUpdateBool,	ze1_compatibility_mode,	zend_executor_globals,	executor_globals)
  #ifdef ZEND_MULTIBYTE
  	STD_ZEND_INI_BOOLEAN("detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals)
-diff -Nura php-5.2.9/Zend/zend.h suhosin-patch-5.2.9-0.9.7/Zend/zend.h
---- php-5.2.9/Zend/zend.h	2008-12-31 12:17:32.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/zend.h	2009-03-05 21:11:35.000000000 +0100
-@@ -532,6 +532,9 @@
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/zend.h php-5.2.17/Zend/zend.h
+--- php-5.2.17.org/Zend/zend.h	2010-01-15 19:26:53.000000000 +0100
++++ php-5.2.17/Zend/zend.h	2021-10-23 19:10:37.406458398 +0200
+@@ -550,6 +550,9 @@ extern void (*zend_on_timeout)(int secon
  extern ZEND_API int (*zend_stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC);
  extern int (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap);
  extern ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC);
@@ -400,7 +400,7 @@ diff -Nura php-5.2.9/Zend/zend.h suhosin-patch-5.2.9-0.9.7/Zend/zend.h
  
  
  ZEND_API void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
-@@ -663,6 +666,13 @@
+@@ -681,6 +684,13 @@ END_EXTERN_C()
  #include "zend_operators.h"
  #include "zend_variables.h"
  
@@ -414,10 +414,10 @@ diff -Nura php-5.2.9/Zend/zend.h suhosin-patch-5.2.9-0.9.7/Zend/zend.h
  #endif /* ZEND_H */
  
  /*
-diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc.c
---- php-5.2.9/Zend/zend_alloc.c	2009-01-25 15:04:09.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc.c	2009-03-05 21:11:35.000000000 +0100
-@@ -311,13 +311,26 @@
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/zend_alloc.c php-5.2.17/Zend/zend_alloc.c
+--- php-5.2.17.org/Zend/zend_alloc.c	2021-10-23 19:10:34.986458398 +0200
++++ php-5.2.17/Zend/zend_alloc.c	2021-10-23 19:10:37.406458398 +0200
+@@ -316,13 +316,26 @@ static const zend_mm_mem_handlers mem_ha
  #define	MEM_BLOCK_GUARD  0x2A8FCC84
  #define	MEM_BLOCK_LEAK   0x6C5E8F2D
  
@@ -446,7 +446,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  } zend_mm_block_info;
  
  #if ZEND_DEBUG
-@@ -423,6 +436,9 @@
+@@ -428,6 +441,9 @@ struct _zend_mm_heap {
  		int miss;
  	} cache_stat[ZEND_MM_NUM_BUCKETS+1];
  #endif
@@ -456,7 +456,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  };
  
  #define ZEND_MM_SMALL_FREE_BUCKET(heap, index) \
-@@ -512,15 +528,15 @@
+@@ -517,15 +533,15 @@ static unsigned int _zend_mm_cookie = 0;
  #define ZEND_MM_ALIGNED_SIZE(size)			((size + ZEND_MM_ALIGNMENT - 1) & ZEND_MM_ALIGNMENT_MASK)
  #define ZEND_MM_ALIGNED_HEADER_SIZE			ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_block))
  #define ZEND_MM_ALIGNED_FREE_HEADER_SIZE	ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_small_free_block))
@@ -475,7 +475,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  
  #define ZEND_MM_BUCKET_INDEX(true_size)		((true_size>>ZEND_MM_ALIGNMENT_LOG2)-(ZEND_MM_ALIGNED_MIN_HEADER_SIZE>>ZEND_MM_ALIGNMENT_LOG2))
  
-@@ -582,6 +598,48 @@
+@@ -587,6 +603,48 @@ static unsigned int _zend_mm_cookie = 0;
  
  #endif
  
@@ -524,7 +524,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  
  #if ZEND_MM_HEAP_PROTECTION
  
-@@ -790,6 +848,12 @@
+@@ -795,6 +853,12 @@ static inline void zend_mm_remove_from_f
  	if (EXPECTED(prev == mm_block)) {
  		zend_mm_free_block **rp, **cp;
  
@@ -537,7 +537,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  #if ZEND_MM_SAFE_UNLINKING
  		if (UNEXPECTED(next != mm_block)) {
  			zend_mm_panic("zend_mm_heap corrupted");
-@@ -828,6 +892,12 @@
+@@ -833,6 +897,12 @@ subst_block:
  		}
  	} else {
  
@@ -550,7 +550,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  #if ZEND_MM_SAFE_UNLINKING
  		if (UNEXPECTED(prev->next_free_block != mm_block) || UNEXPECTED(next->prev_free_block != mm_block)) {
  			zend_mm_panic("zend_mm_heap corrupted");
-@@ -875,6 +945,11 @@
+@@ -880,6 +950,11 @@ static inline void zend_mm_init(zend_mm_
  		heap->large_free_buckets[i] = NULL;
  	}
  	heap->rest_buckets[0] = heap->rest_buckets[1] = ZEND_MM_REST_BUCKET(heap);
@@ -562,7 +562,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  }
  
  static void zend_mm_del_segment(zend_mm_heap *heap, zend_mm_segment *segment)
-@@ -1779,6 +1854,11 @@
+@@ -1784,6 +1859,11 @@ static void *_zend_mm_alloc_int(zend_mm_
  			best_fit = heap->cache[index];
  			heap->cache[index] = best_fit->prev_free_block;
  			heap->cached -= true_size;
@@ -574,7 +574,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  			ZEND_MM_CHECK_MAGIC(best_fit, MEM_BLOCK_CACHED);
  			ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 0);
  			return ZEND_MM_DATA_OF(best_fit);
-@@ -1918,6 +1998,12 @@
+@@ -1923,6 +2003,12 @@ zend_mm_finished_searching_for_block:
  
  	ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 1);
  
@@ -587,7 +587,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  	heap->size += true_size;
  	if (heap->peak < heap->size) {
  		heap->peak = heap->size;
-@@ -1941,6 +2027,9 @@
+@@ -1946,6 +2032,9 @@ static void _zend_mm_free_int(zend_mm_he
  
  	mm_block = ZEND_MM_HEADER_OF(p);
  	size = ZEND_MM_BLOCK_SIZE(mm_block);
@@ -597,7 +597,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  	ZEND_MM_CHECK_PROTECTION(mm_block);
  
  #if ZEND_DEBUG || ZEND_MM_HEAP_PROTECTION
-@@ -2003,6 +2092,9 @@
+@@ -2008,6 +2097,9 @@ static void *_zend_mm_realloc_int(zend_m
  	mm_block = ZEND_MM_HEADER_OF(p);
  	true_size = ZEND_MM_TRUE_SIZE(size);
  	orig_size = ZEND_MM_BLOCK_SIZE(mm_block);
@@ -607,7 +607,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  	ZEND_MM_CHECK_PROTECTION(mm_block);
  
  	if (UNEXPECTED(true_size < size)) {
-@@ -2034,6 +2126,11 @@
+@@ -2039,6 +2131,11 @@ static void *_zend_mm_realloc_int(zend_m
  			HANDLE_UNBLOCK_INTERRUPTIONS();
  		}
  		ZEND_MM_SET_DEBUG_INFO(mm_block, size, 0, 0);
@@ -619,7 +619,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  		return p;
  	}
  
-@@ -2053,13 +2150,18 @@
+@@ -2058,13 +2155,18 @@ static void *_zend_mm_realloc_int(zend_m
  			heap->cache[index] = best_fit->prev_free_block;
  			ZEND_MM_CHECK_MAGIC(best_fit, MEM_BLOCK_CACHED);
  			ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 0);
@@ -639,7 +639,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  #endif
  
  			heap->cached -= true_size - orig_size;
-@@ -2117,6 +2219,11 @@
+@@ -2122,6 +2224,11 @@ static void *_zend_mm_realloc_int(zend_m
  			if (heap->peak < heap->size) {
  				heap->peak = heap->size;
  			}
@@ -651,7 +651,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  			HANDLE_UNBLOCK_INTERRUPTIONS();
  			return p;
  		} else if (ZEND_MM_IS_FIRST_BLOCK(mm_block) &&
-@@ -2220,6 +2327,11 @@
+@@ -2225,6 +2332,11 @@ out_of_memory:
  		}
  
  		HANDLE_UNBLOCK_INTERRUPTIONS();
@@ -663,7 +663,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  		return ZEND_MM_DATA_OF(mm_block);
  	}
  
-@@ -2227,7 +2339,7 @@
+@@ -2232,7 +2344,7 @@ out_of_memory:
  #if ZEND_DEBUG || ZEND_MM_HEAP_PROTECTION
  	memcpy(ptr, p, mm_block->debug.size);
  #else
@@ -672,7 +672,7 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  #endif
  	_zend_mm_free_int(heap, p ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
  	return ptr;
-@@ -2490,6 +2602,17 @@
+@@ -2499,6 +2611,17 @@ ZEND_API void shutdown_memory_manager(in
  	zend_mm_shutdown(AG(mm_heap), full_shutdown, silent);
  }
  
@@ -690,10 +690,10 @@ diff -Nura php-5.2.9/Zend/zend_alloc.c suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  static void alloc_globals_ctor(zend_alloc_globals *alloc_globals TSRMLS_DC)
  {
  	char *tmp;
-diff -Nura php-5.2.9/Zend/zend_alloc.h suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc.h
---- php-5.2.9/Zend/zend_alloc.h	2009-01-25 14:42:39.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc.h	2009-03-05 21:11:35.000000000 +0100
-@@ -129,6 +129,9 @@
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/zend_alloc.h php-5.2.17/Zend/zend_alloc.h
+--- php-5.2.17.org/Zend/zend_alloc.h	2010-01-05 21:46:53.000000000 +0100
++++ php-5.2.17/Zend/zend_alloc.h	2021-10-23 19:10:37.406458398 +0200
+@@ -129,6 +129,9 @@ ZEND_API int zend_set_memory_limit(size_
  
  ZEND_API void start_memory_manager(TSRMLS_D);
  ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC);
@@ -703,9 +703,9 @@ diff -Nura php-5.2.9/Zend/zend_alloc.h suhosin-patch-5.2.9-0.9.7/Zend/zend_alloc
  ZEND_API int is_zend_mm(TSRMLS_D);
  
  #if ZEND_DEBUG
-diff -Nura php-5.2.9/Zend/zend_canary.c suhosin-patch-5.2.9-0.9.7/Zend/zend_canary.c
---- php-5.2.9/Zend/zend_canary.c	1970-01-01 01:00:00.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/zend_canary.c	2009-03-05 21:11:35.000000000 +0100
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/zend_canary.c php-5.2.17/Zend/zend_canary.c
+--- php-5.2.17.org/Zend/zend_canary.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/Zend/zend_canary.c	2021-10-23 19:10:37.406458398 +0200
 @@ -0,0 +1,64 @@
 +/*
 +   +----------------------------------------------------------------------+
@@ -771,10 +771,10 @@ diff -Nura php-5.2.9/Zend/zend_canary.c suhosin-patch-5.2.9-0.9.7/Zend/zend_cana
 + * vim600: sw=4 ts=4 fdm=marker
 + * vim<600: sw=4 ts=4
 + */
-diff -Nura php-5.2.9/Zend/zend_compile.c suhosin-patch-5.2.9-0.9.7/Zend/zend_compile.c
---- php-5.2.9/Zend/zend_compile.c	2009-01-26 22:27:41.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/zend_compile.c	2009-03-05 21:11:35.000000000 +0100
-@@ -54,7 +54,6 @@
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/zend_compile.c php-5.2.17/Zend/zend_compile.c
+--- php-5.2.17.org/Zend/zend_compile.c	2021-10-23 19:10:34.983125065 +0200
++++ php-5.2.17/Zend/zend_compile.c	2021-10-23 19:10:37.406458398 +0200
+@@ -54,7 +54,6 @@ static void zend_duplicate_property_info
  	property_info->name = zend_strndup(property_info->name, property_info->name_length);
  }
  
@@ -782,7 +782,7 @@ diff -Nura php-5.2.9/Zend/zend_compile.c suhosin-patch-5.2.9-0.9.7/Zend/zend_com
  static void zend_destroy_property_info(zend_property_info *property_info)
  {
  	efree(property_info->name);
-@@ -68,6 +67,10 @@
+@@ -68,6 +67,10 @@ static void zend_destroy_property_info_i
  {
  	free(property_info->name);
  }
@@ -793,10 +793,10 @@ diff -Nura php-5.2.9/Zend/zend_compile.c suhosin-patch-5.2.9-0.9.7/Zend/zend_com
  
  static void build_runtime_defined_function_key(zval *result, char *name, int name_length TSRMLS_DC)
  {
-diff -Nura php-5.2.9/Zend/zend_compile.h suhosin-patch-5.2.9-0.9.7/Zend/zend_compile.h
---- php-5.2.9/Zend/zend_compile.h	2009-01-21 11:15:46.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/zend_compile.h	2009-03-05 21:11:35.000000000 +0100
-@@ -564,6 +564,11 @@
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/zend_compile.h php-5.2.17/Zend/zend_compile.h
+--- php-5.2.17.org/Zend/zend_compile.h	2010-01-05 21:46:53.000000000 +0100
++++ php-5.2.17/Zend/zend_compile.h	2021-10-23 19:10:37.406458398 +0200
+@@ -568,6 +568,11 @@ ZEND_API int zend_auto_global_disable_ji
  
  int zendlex(znode *zendlval TSRMLS_DC);
  
@@ -808,7 +808,7 @@ diff -Nura php-5.2.9/Zend/zend_compile.h suhosin-patch-5.2.9-0.9.7/Zend/zend_com
  /* BEGIN: OPCODES */
  
  #include "zend_vm_opcodes.h"
-@@ -689,6 +694,7 @@
+@@ -693,6 +698,7 @@ int zendlex(znode *zendlval TSRMLS_DC);
  #define ZEND_RETURNS_FUNCTION 1<<0
  #define ZEND_RETURNS_NEW      1<<1
  
@@ -816,10 +816,10 @@ diff -Nura php-5.2.9/Zend/zend_compile.h suhosin-patch-5.2.9-0.9.7/Zend/zend_com
  END_EXTERN_C()
  
  #define ZEND_CLONE_FUNC_NAME		"__clone"
-diff -Nura php-5.2.9/Zend/zend_constants.c suhosin-patch-5.2.9-0.9.7/Zend/zend_constants.c
---- php-5.2.9/Zend/zend_constants.c	2008-12-31 12:17:33.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/zend_constants.c	2009-03-05 21:11:35.000000000 +0100
-@@ -110,6 +110,75 @@
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/zend_constants.c php-5.2.17/Zend/zend_constants.c
+--- php-5.2.17.org/Zend/zend_constants.c	2010-02-08 13:31:33.000000000 +0100
++++ php-5.2.17/Zend/zend_constants.c	2021-10-23 19:10:37.406458398 +0200
+@@ -110,6 +110,75 @@ void zend_register_standard_constants(TS
  	REGISTER_MAIN_LONG_CONSTANT("E_USER_NOTICE", E_USER_NOTICE, CONST_PERSISTENT | CONST_CS);
  
  	REGISTER_MAIN_LONG_CONSTANT("E_ALL", E_ALL, CONST_PERSISTENT | CONST_CS);
@@ -895,9 +895,9 @@ diff -Nura php-5.2.9/Zend/zend_constants.c suhosin-patch-5.2.9-0.9.7/Zend/zend_c
  
  	/* true/false constants */
  	{
-diff -Nura php-5.2.9/Zend/zend_errors.h suhosin-patch-5.2.9-0.9.7/Zend/zend_errors.h
---- php-5.2.9/Zend/zend_errors.h	2008-12-31 12:17:33.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/zend_errors.h	2009-03-05 21:11:35.000000000 +0100
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/zend_errors.h php-5.2.17/Zend/zend_errors.h
+--- php-5.2.17.org/Zend/zend_errors.h	2010-01-05 21:46:53.000000000 +0100
++++ php-5.2.17/Zend/zend_errors.h	2021-10-23 19:10:37.406458398 +0200
 @@ -39,6 +39,20 @@
  #define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR)
  #define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
@@ -919,18 +919,18 @@ diff -Nura php-5.2.9/Zend/zend_errors.h suhosin-patch-5.2.9-0.9.7/Zend/zend_erro
  #endif /* ZEND_ERRORS_H */
  
  /*
-diff -Nura php-5.2.9/Zend/zend_hash.c suhosin-patch-5.2.9-0.9.7/Zend/zend_hash.c
---- php-5.2.9/Zend/zend_hash.c	2008-12-31 12:17:33.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/zend_hash.c	2009-03-05 21:11:35.000000000 +0100
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/zend_hash.c php-5.2.17/Zend/zend_hash.c
+--- php-5.2.17.org/Zend/zend_hash.c	2010-05-03 18:36:04.000000000 +0200
++++ php-5.2.17/Zend/zend_hash.c	2021-10-23 19:10:37.409791732 +0200
 @@ -20,6 +20,7 @@
- /* $Id$ */
+ /* $Id: zend_hash.c 298914 2010-05-03 16:36:04Z felipe $ */
  
  #include "zend.h"
 +#include "zend_compile.h"
  
  #define CONNECT_TO_BUCKET_DLLIST(element, list_head)		\
  	(element)->pNext = (list_head);							\
-@@ -132,7 +133,189 @@
+@@ -132,7 +133,189 @@ ZEND_API ulong zend_hash_func(char *arKe
  		(p)->pDataPtr=NULL;												\
  	}
  
@@ -1060,7 +1060,7 @@ diff -Nura php-5.2.9/Zend/zend_hash.c suhosin-patch-5.2.9-0.9.7/Zend/zend_hash.c
 +	
 +	zend_hash_dprot_end_write();
 +}
-+
+ 
 +static void zend_hash_check_destructor(dtor_func_t pDestructor)
 +{
 +	unsigned long value;
@@ -1112,7 +1112,7 @@ diff -Nura php-5.2.9/Zend/zend_hash.c suhosin-patch-5.2.9-0.9.7/Zend/zend_hash.c
 +	
 +	zend_hash_dprot_end_read();
 +}
- 
++
 +#else
 +#define zend_hash_add_destructor(pDestructor) do {} while(0)
 +#define zend_hash_check_destructor(pDestructor) do {} while(0)
@@ -1120,7 +1120,7 @@ diff -Nura php-5.2.9/Zend/zend_hash.c suhosin-patch-5.2.9-0.9.7/Zend/zend_hash.c
  
  ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
  {
-@@ -153,6 +336,7 @@
+@@ -153,6 +336,7 @@ ZEND_API int _zend_hash_init(HashTable *
  
  	ht->nTableMask = ht->nTableSize - 1;
  	ht->pDestructor = pDestructor;
@@ -1128,7 +1128,7 @@ diff -Nura php-5.2.9/Zend/zend_hash.c suhosin-patch-5.2.9-0.9.7/Zend/zend_hash.c
  	ht->arBuckets = NULL;
  	ht->pListHead = NULL;
  	ht->pListTail = NULL;
-@@ -230,6 +414,8 @@
+@@ -230,6 +414,8 @@ ZEND_API int _zend_hash_add_or_update(Ha
  					return FAILURE;
  				}
  #endif
@@ -1137,7 +1137,7 @@ diff -Nura php-5.2.9/Zend/zend_hash.c suhosin-patch-5.2.9-0.9.7/Zend/zend_hash.c
  				if (ht->pDestructor) {
  					ht->pDestructor(p->pData);
  				}
-@@ -295,6 +481,7 @@
+@@ -295,6 +481,7 @@ ZEND_API int _zend_hash_quick_add_or_upd
  					return FAILURE;
  				}
  #endif
@@ -1145,7 +1145,7 @@ diff -Nura php-5.2.9/Zend/zend_hash.c suhosin-patch-5.2.9-0.9.7/Zend/zend_hash.c
  				if (ht->pDestructor) {
  					ht->pDestructor(p->pData);
  				}
-@@ -370,6 +557,7 @@
+@@ -370,6 +557,7 @@ ZEND_API int _zend_hash_index_update_or_
  				return FAILURE;
  			}
  #endif
@@ -1153,7 +1153,7 @@ diff -Nura php-5.2.9/Zend/zend_hash.c suhosin-patch-5.2.9-0.9.7/Zend/zend_hash.c
  			if (ht->pDestructor) {
  				ht->pDestructor(p->pData);
  			}
-@@ -493,6 +681,7 @@
+@@ -493,6 +681,7 @@ ZEND_API int zend_hash_del_key_or_index(
  			if (ht->pInternalPointer == p) {
  				ht->pInternalPointer = p->pListNext;
  			}
@@ -1161,7 +1161,7 @@ diff -Nura php-5.2.9/Zend/zend_hash.c suhosin-patch-5.2.9-0.9.7/Zend/zend_hash.c
  			if (ht->pDestructor) {
  				ht->pDestructor(p->pData);
  			}
-@@ -518,6 +707,8 @@
+@@ -518,6 +707,8 @@ ZEND_API void zend_hash_destroy(HashTabl
  
  	SET_INCONSISTENT(HT_IS_DESTROYING);
  
@@ -1170,7 +1170,7 @@ diff -Nura php-5.2.9/Zend/zend_hash.c suhosin-patch-5.2.9-0.9.7/Zend/zend_hash.c
  	p = ht->pListHead;
  	while (p != NULL) {
  		q = p;
-@@ -544,6 +735,8 @@
+@@ -544,6 +735,8 @@ ZEND_API void zend_hash_clean(HashTable
  
  	SET_INCONSISTENT(HT_CLEANING);
  
@@ -1179,7 +1179,7 @@ diff -Nura php-5.2.9/Zend/zend_hash.c suhosin-patch-5.2.9-0.9.7/Zend/zend_hash.c
  	p = ht->pListHead;
  	while (p != NULL) {
  		q = p;
-@@ -607,6 +800,7 @@
+@@ -607,6 +800,7 @@ static Bucket *zend_hash_apply_deleter(H
  	ht->nNumOfElements--;
  	HANDLE_UNBLOCK_INTERRUPTIONS();
  
@@ -1187,9 +1187,9 @@ diff -Nura php-5.2.9/Zend/zend_hash.c suhosin-patch-5.2.9-0.9.7/Zend/zend_hash.c
  	if (ht->pDestructor) {
  		ht->pDestructor(p->pData);
  	}
-diff -Nura php-5.2.9/Zend/zend_llist.c suhosin-patch-5.2.9-0.9.7/Zend/zend_llist.c
---- php-5.2.9/Zend/zend_llist.c	2008-12-31 12:17:33.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/Zend/zend_llist.c	2009-03-05 21:11:35.000000000 +0100
+diff -urNp -x '*.orig' php-5.2.17.org/Zend/zend_llist.c php-5.2.17/Zend/zend_llist.c
+--- php-5.2.17.org/Zend/zend_llist.c	2010-01-05 21:46:53.000000000 +0100
++++ php-5.2.17/Zend/zend_llist.c	2021-10-23 19:10:37.409791732 +0200
 @@ -23,6 +23,184 @@
  #include "zend_llist.h"
  #include "zend_qsort.h"
@@ -1375,7 +1375,7 @@ diff -Nura php-5.2.9/Zend/zend_llist.c suhosin-patch-5.2.9-0.9.7/Zend/zend_llist
  ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t dtor, unsigned char persistent)
  {
  	l->head  = NULL;
-@@ -30,6 +208,7 @@
+@@ -30,6 +208,7 @@ ZEND_API void zend_llist_init(zend_llist
  	l->count = 0;
  	l->size  = size;
  	l->dtor  = dtor;
@@ -1383,7 +1383,7 @@ diff -Nura php-5.2.9/Zend/zend_llist.c suhosin-patch-5.2.9-0.9.7/Zend/zend_llist
  	l->persistent = persistent;
  }
  
-@@ -81,6 +260,7 @@
+@@ -81,6 +260,7 @@ ZEND_API void zend_llist_prepend_element
  			} else {\
  				(l)->tail = (current)->prev;\
  			}\
@@ -1391,7 +1391,7 @@ diff -Nura php-5.2.9/Zend/zend_llist.c suhosin-patch-5.2.9-0.9.7/Zend/zend_llist
  			if ((l)->dtor) {\
  				(l)->dtor((current)->data);\
  			}\
-@@ -108,6 +288,7 @@
+@@ -108,6 +288,7 @@ ZEND_API void zend_llist_destroy(zend_ll
  {
  	zend_llist_element *current=l->head, *next;
  	
@@ -1399,7 +1399,7 @@ diff -Nura php-5.2.9/Zend/zend_llist.c suhosin-patch-5.2.9-0.9.7/Zend/zend_llist
  	while (current) {
  		next = current->next;
  		if (l->dtor) {
-@@ -133,6 +314,7 @@
+@@ -133,6 +314,7 @@ ZEND_API void *zend_llist_remove_tail(ze
  	zend_llist_element *old_tail;
  	void *data;
  
@@ -1407,10 +1407,10 @@ diff -Nura php-5.2.9/Zend/zend_llist.c suhosin-patch-5.2.9-0.9.7/Zend/zend_llist
  	if ((old_tail = l->tail)) {
  		if (old_tail->prev) {
  			old_tail->prev->next = NULL;
-diff -Nura php-5.2.9/configure suhosin-patch-5.2.9-0.9.7/configure
---- php-5.2.9/configure	2009-02-25 16:39:40.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/configure	2009-03-05 21:11:35.000000000 +0100
-@@ -18576,6 +18576,9 @@
+diff -urNp -x '*.orig' php-5.2.17.org/configure php-5.2.17/configure
+--- php-5.2.17.org/configure	2011-01-07 00:04:43.000000000 +0100
++++ php-5.2.17/configure	2021-10-23 19:10:37.429791732 +0200
+@@ -18487,6 +18487,9 @@ EOF
  
  fi
  
@@ -1419,8 +1419,8 @@ diff -Nura php-5.2.9/configure suhosin-patch-5.2.9-0.9.7/configure
 +EOF
  
    echo $ac_n "checking for declared timezone""... $ac_c" 1>&6
- echo "configure:18582: checking for declared timezone" >&5
-@@ -116592,7 +116595,7 @@
+ echo "configure:18493: checking for declared timezone" >&5
+@@ -118100,7 +118103,7 @@ EOF
         php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
         strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
         network.c php_open_temporary_file.c php_logos.c \
@@ -1429,7 +1429,7 @@ diff -Nura php-5.2.9/configure suhosin-patch-5.2.9-0.9.7/configure
    
        IFS=.
        set $ac_src
-@@ -116794,7 +116797,7 @@
+@@ -118302,7 +118305,7 @@ esac
      zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
      zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
      zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c zend_stream.c \
@@ -1438,10 +1438,10 @@ diff -Nura php-5.2.9/configure suhosin-patch-5.2.9-0.9.7/configure
    
        IFS=.
        set $ac_src
-diff -Nura php-5.2.9/configure.in suhosin-patch-5.2.9-0.9.7/configure.in
---- php-5.2.9/configure.in	2009-02-25 15:56:50.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/configure.in	2009-03-05 21:11:35.000000000 +0100
-@@ -257,6 +257,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/configure.in php-5.2.17/configure.in
+--- php-5.2.17.org/configure.in	2021-10-23 19:10:35.066458398 +0200
++++ php-5.2.17/configure.in	2021-10-23 19:10:37.429791732 +0200
+@@ -255,6 +255,7 @@ sinclude(Zend/Zend.m4)
  sinclude(TSRM/threads.m4)
  sinclude(TSRM/tsrm.m4)
  
@@ -1449,7 +1449,7 @@ diff -Nura php-5.2.9/configure.in suhosin-patch-5.2.9-0.9.7/configure.in
  
  divert(2)
  
-@@ -1368,7 +1369,7 @@
+@@ -1368,7 +1369,7 @@ PHP_ADD_SOURCES(main, main.c snprintf.c
         php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
         strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
         network.c php_open_temporary_file.c php_logos.c \
@@ -1458,7 +1458,7 @@ diff -Nura php-5.2.9/configure.in suhosin-patch-5.2.9-0.9.7/configure.in
  
  PHP_ADD_SOURCES(main/streams, streams.c cast.c memory.c filter.c \
         plain_wrapper.c userspace.c transports.c xp_socket.c mmap.c)
-@@ -1394,7 +1395,7 @@
+@@ -1394,7 +1395,7 @@ PHP_ADD_SOURCES(Zend, \
      zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
      zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
      zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c zend_stream.c \
@@ -1467,10 +1467,10 @@ diff -Nura php-5.2.9/configure.in suhosin-patch-5.2.9-0.9.7/configure.in
  
  if test -r "$abs_srcdir/Zend/zend_objects.c"; then
    PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c zend_default_classes.c)
-diff -Nura php-5.2.9/ext/standard/basic_functions.c suhosin-patch-5.2.9-0.9.7/ext/standard/basic_functions.c
---- php-5.2.9/ext/standard/basic_functions.c	2008-12-31 12:17:44.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/ext/standard/basic_functions.c	2009-03-05 21:11:35.000000000 +0100
-@@ -3575,7 +3575,9 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/standard/basic_functions.c php-5.2.17/ext/standard/basic_functions.c
+--- php-5.2.17.org/ext/standard/basic_functions.c	2021-10-23 19:10:34.963125065 +0200
++++ php-5.2.17/ext/standard/basic_functions.c	2021-10-23 19:10:37.433125065 +0200
+@@ -3574,7 +3574,9 @@ zend_function_entry basic_functions[] =
  	PHP_FALIAS(socket_get_status, stream_get_meta_data,						arginfo_stream_get_meta_data)
  
  #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
@@ -1481,10 +1481,10 @@ diff -Nura php-5.2.9/ext/standard/basic_functions.c suhosin-patch-5.2.9-0.9.7/ex
  #endif
  
  #ifdef HAVE_FNMATCH
-diff -Nura php-5.2.9/ext/standard/dl.c suhosin-patch-5.2.9-0.9.7/ext/standard/dl.c
---- php-5.2.9/ext/standard/dl.c	2008-12-31 12:17:44.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/ext/standard/dl.c	2009-03-05 21:11:35.000000000 +0100
-@@ -246,6 +246,19 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/standard/dl.c php-5.2.17/ext/standard/dl.c
+--- php-5.2.17.org/ext/standard/dl.c	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/ext/standard/dl.c	2021-10-23 19:10:37.433125065 +0200
+@@ -246,6 +246,19 @@ void php_dl(zval *file, int type, zval *
  			RETURN_FALSE;
  		}
  	}
@@ -1504,10 +1504,10 @@ diff -Nura php-5.2.9/ext/standard/dl.c suhosin-patch-5.2.9-0.9.7/ext/standard/dl
  	RETURN_TRUE;
  }
  /* }}} */
-diff -Nura php-5.2.9/ext/standard/file.c suhosin-patch-5.2.9-0.9.7/ext/standard/file.c
---- php-5.2.9/ext/standard/file.c	2008-12-31 12:17:44.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/ext/standard/file.c	2009-03-05 21:11:35.000000000 +0100
-@@ -2387,7 +2387,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/standard/file.c php-5.2.17/ext/standard/file.c
+--- php-5.2.17.org/ext/standard/file.c	2021-10-23 19:10:34.966458398 +0200
++++ php-5.2.17/ext/standard/file.c	2021-10-23 19:10:37.433125065 +0200
+@@ -2410,7 +2410,7 @@ out:
  #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
  /* {{{ proto string realpath(string path)
     Return the resolved path */
@@ -1516,10 +1516,10 @@ diff -Nura php-5.2.9/ext/standard/file.c suhosin-patch-5.2.9-0.9.7/ext/standard/
  {
  	zval **path;
  	char resolved_path_buff[MAXPATHLEN];
-diff -Nura php-5.2.9/ext/standard/file.h suhosin-patch-5.2.9-0.9.7/ext/standard/file.h
---- php-5.2.9/ext/standard/file.h	2008-12-31 12:17:45.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/ext/standard/file.h	2009-03-05 21:11:35.000000000 +0100
-@@ -61,7 +61,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/standard/file.h php-5.2.17/ext/standard/file.h
+--- php-5.2.17.org/ext/standard/file.h	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/ext/standard/file.h	2021-10-23 19:10:37.433125065 +0200
+@@ -61,7 +61,7 @@ PHP_FUNCTION(flock);
  PHP_FUNCTION(fd_set);
  PHP_FUNCTION(fd_isset);
  #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
@@ -1528,10 +1528,10 @@ diff -Nura php-5.2.9/ext/standard/file.h suhosin-patch-5.2.9-0.9.7/ext/standard/
  #endif
  #ifdef HAVE_FNMATCH
  PHP_FUNCTION(fnmatch);
-diff -Nura php-5.2.9/ext/standard/info.c suhosin-patch-5.2.9-0.9.7/ext/standard/info.c
---- php-5.2.9/ext/standard/info.c	2008-12-31 12:17:45.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/ext/standard/info.c	2009-03-05 21:11:35.000000000 +0100
-@@ -648,6 +648,31 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/standard/info.c php-5.2.17/ext/standard/info.c
+--- php-5.2.17.org/ext/standard/info.c	2021-10-23 19:10:34.993125065 +0200
++++ php-5.2.17/ext/standard/info.c	2021-10-23 19:10:37.433125065 +0200
+@@ -648,6 +648,31 @@ PHPAPI void php_print_info(int flag TSRM
  		
  		php_info_print_table_end();
  
@@ -1563,10 +1563,10 @@ diff -Nura php-5.2.9/ext/standard/info.c suhosin-patch-5.2.9-0.9.7/ext/standard/
  		/* Zend Engine */
  		php_info_print_box_start(0);
  		if (expose_php && !sapi_module.phpinfo_as_text) {
-diff -Nura php-5.2.9/ext/standard/syslog.c suhosin-patch-5.2.9-0.9.7/ext/standard/syslog.c
---- php-5.2.9/ext/standard/syslog.c	2008-12-31 12:17:46.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/ext/standard/syslog.c	2009-03-05 21:11:35.000000000 +0100
-@@ -42,6 +42,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/ext/standard/syslog.c php-5.2.17/ext/standard/syslog.c
+--- php-5.2.17.org/ext/standard/syslog.c	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/ext/standard/syslog.c	2021-10-23 19:10:37.433125065 +0200
+@@ -42,6 +42,7 @@ static void start_syslog(TSRMLS_D);
   */
  PHP_MINIT_FUNCTION(syslog)
  {
@@ -1574,7 +1574,7 @@ diff -Nura php-5.2.9/ext/standard/syslog.c suhosin-patch-5.2.9-0.9.7/ext/standar
  	/* error levels */
  	REGISTER_LONG_CONSTANT("LOG_EMERG", LOG_EMERG, CONST_CS | CONST_PERSISTENT); /* system unusable */
  	REGISTER_LONG_CONSTANT("LOG_ALERT", LOG_ALERT, CONST_CS | CONST_PERSISTENT); /* immediate action required */
-@@ -97,6 +98,7 @@
+@@ -97,6 +98,7 @@ PHP_MINIT_FUNCTION(syslog)
  	/* AIX doesn't have LOG_PERROR */
  	REGISTER_LONG_CONSTANT("LOG_PERROR", LOG_PERROR, CONST_CS | CONST_PERSISTENT); /*log to stderr*/
  #endif
@@ -1582,10 +1582,10 @@ diff -Nura php-5.2.9/ext/standard/syslog.c suhosin-patch-5.2.9-0.9.7/ext/standar
  	BG(syslog_device)=NULL;
  
  	return SUCCESS;
-diff -Nura php-5.2.9/main/fopen_wrappers.c suhosin-patch-5.2.9-0.9.7/main/fopen_wrappers.c
---- php-5.2.9/main/fopen_wrappers.c	2009-02-10 17:14:27.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/main/fopen_wrappers.c	2009-03-05 21:11:35.000000000 +0100
-@@ -110,7 +110,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/main/fopen_wrappers.c php-5.2.17/main/fopen_wrappers.c
+--- php-5.2.17.org/main/fopen_wrappers.c	2021-10-23 19:10:34.986458398 +0200
++++ php-5.2.17/main/fopen_wrappers.c	2021-10-23 19:10:37.433125065 +0200
+@@ -110,7 +110,7 @@ PHPAPI int php_check_specific_open_based
  
  	/* normalize and expand path */
  	if (expand_filepath(path, resolved_name TSRMLS_CC) == NULL) {
@@ -1594,7 +1594,7 @@ diff -Nura php-5.2.9/main/fopen_wrappers.c suhosin-patch-5.2.9-0.9.7/main/fopen_
  	}
  
  	path_len = strlen(resolved_name);
-@@ -182,6 +182,12 @@
+@@ -189,6 +189,12 @@ PHPAPI int php_check_specific_open_based
  			}
  		}
  
@@ -1607,7 +1607,7 @@ diff -Nura php-5.2.9/main/fopen_wrappers.c suhosin-patch-5.2.9-0.9.7/main/fopen_
  		/* Check the path */
  #if defined(PHP_WIN32) || defined(NETWARE)
  		if (strncasecmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) {
-@@ -205,7 +211,7 @@
+@@ -217,7 +223,7 @@ PHPAPI int php_check_specific_open_based
  		}
  	} else {
  		/* Unable to resolve the real path, return -1 */
@@ -1616,7 +1616,7 @@ diff -Nura php-5.2.9/main/fopen_wrappers.c suhosin-patch-5.2.9-0.9.7/main/fopen_
  	}
  }
  /* }}} */
-@@ -224,22 +230,44 @@
+@@ -236,22 +242,44 @@ PHPAPI int php_check_open_basedir_ex(con
  		char *pathbuf;
  		char *ptr;
  		char *end;
@@ -1662,10 +1662,10 @@ diff -Nura php-5.2.9/main/fopen_wrappers.c suhosin-patch-5.2.9-0.9.7/main/fopen_
  
  			ptr = end;
  		}
-diff -Nura php-5.2.9/main/main.c suhosin-patch-5.2.9-0.9.7/main/main.c
---- php-5.2.9/main/main.c	2008-12-31 12:17:47.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/main/main.c	2009-03-05 21:11:35.000000000 +0100
-@@ -89,6 +89,9 @@
+diff -urNp -x '*.orig' php-5.2.17.org/main/main.c php-5.2.17/main/main.c
+--- php-5.2.17.org/main/main.c	2021-10-23 19:10:34.986458398 +0200
++++ php-5.2.17/main/main.c	2021-10-23 19:10:37.433125065 +0200
+@@ -90,6 +90,9 @@
  
  #include "SAPI.h"
  #include "rfc1867.h"
@@ -1675,7 +1675,7 @@ diff -Nura php-5.2.9/main/main.c suhosin-patch-5.2.9-0.9.7/main/main.c
  /* }}} */
  
  #ifndef ZTS
-@@ -1374,7 +1377,7 @@
+@@ -1387,7 +1390,7 @@ void php_request_shutdown_for_exec(void
  
  	/* used to close fd's in the 3..255 range here, but it's problematic
  	 */
@@ -1684,7 +1684,7 @@ diff -Nura php-5.2.9/main/main.c suhosin-patch-5.2.9-0.9.7/main/main.c
  }
  /* }}} */
  
-@@ -1415,6 +1418,9 @@
+@@ -1428,6 +1431,9 @@ void php_request_shutdown_for_hook(void
  
  	zend_try {
  		shutdown_memory_manager(CG(unclean_shutdown), 0 TSRMLS_CC);
@@ -1694,7 +1694,7 @@ diff -Nura php-5.2.9/main/main.c suhosin-patch-5.2.9-0.9.7/main/main.c
  	} zend_end_try();
  
  	zend_try {
-@@ -1509,6 +1515,9 @@
+@@ -1522,6 +1528,9 @@ void php_request_shutdown(void *dummy)
  	/* 11. Free Willy (here be crashes) */
  	zend_try {
  		shutdown_memory_manager(CG(unclean_shutdown) || !report_memleaks, 0 TSRMLS_CC);
@@ -1704,7 +1704,7 @@ diff -Nura php-5.2.9/main/main.c suhosin-patch-5.2.9-0.9.7/main/main.c
  	} zend_end_try();
  
  	/* 12. Reset max_execution_time */
-@@ -1668,6 +1677,9 @@
+@@ -1681,6 +1690,9 @@ int php_module_startup(sapi_module_struc
  #ifdef ZTS
  	tsrm_ls = ts_resource(0);
  #endif
@@ -1714,7 +1714,7 @@ diff -Nura php-5.2.9/main/main.c suhosin-patch-5.2.9-0.9.7/main/main.c
  
  	module_shutdown = 0;
  	module_startup = 1;
-@@ -1809,6 +1821,10 @@
+@@ -1822,6 +1834,10 @@ int php_module_startup(sapi_module_struc
  	REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_PATH", PHP_CONFIG_FILE_PATH, strlen(PHP_CONFIG_FILE_PATH), CONST_PERSISTENT | CONST_CS);
  	REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_SCAN_DIR", PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT | CONST_CS);
  	REGISTER_MAIN_STRINGL_CONSTANT("PHP_SHLIB_SUFFIX", PHP_SHLIB_SUFFIX, sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS);
@@ -1725,7 +1725,7 @@ diff -Nura php-5.2.9/main/main.c suhosin-patch-5.2.9-0.9.7/main/main.c
  	REGISTER_MAIN_STRINGL_CONSTANT("PHP_EOL", PHP_EOL, sizeof(PHP_EOL)-1, CONST_PERSISTENT | CONST_CS);
  	REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MAX", LONG_MAX, CONST_PERSISTENT | CONST_CS);
  	REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", sizeof(long), CONST_PERSISTENT | CONST_CS);
-@@ -1858,7 +1874,9 @@
+@@ -1871,7 +1887,9 @@ int php_module_startup(sapi_module_struc
  	module_startup = 0;
  
  	shutdown_memory_manager(1, 0 TSRMLS_CC);
@@ -1736,7 +1736,7 @@ diff -Nura php-5.2.9/main/main.c suhosin-patch-5.2.9-0.9.7/main/main.c
  	/* we're done */
  	return SUCCESS;
  }
-@@ -1917,6 +1935,9 @@
+@@ -1930,6 +1948,9 @@ void php_module_shutdown(TSRMLS_D)
  #ifndef ZTS
  	zend_ini_shutdown(TSRMLS_C);
  	shutdown_memory_manager(CG(unclean_shutdown), 1 TSRMLS_CC);
@@ -1746,9 +1746,9 @@ diff -Nura php-5.2.9/main/main.c suhosin-patch-5.2.9-0.9.7/main/main.c
  	core_globals_dtor(&core_globals TSRMLS_CC);
  #else
  	zend_ini_global_shutdown(TSRMLS_C);
-diff -Nura php-5.2.9/main/php.h suhosin-patch-5.2.9-0.9.7/main/php.h
---- php-5.2.9/main/php.h	2008-12-31 12:17:47.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/main/php.h	2009-03-05 21:11:35.000000000 +0100
+diff -urNp -x '*.orig' php-5.2.17.org/main/php.h php-5.2.17/main/php.h
+--- php-5.2.17.org/main/php.h	2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/main/php.h	2021-10-23 19:10:37.433125065 +0200
 @@ -40,6 +40,13 @@
  #undef sprintf
  #define sprintf php_sprintf
@@ -1763,7 +1763,7 @@ diff -Nura php-5.2.9/main/php.h suhosin-patch-5.2.9-0.9.7/main/php.h
  /* PHP's DEBUG value must match Zend's ZEND_DEBUG value */
  #undef PHP_DEBUG
  #define PHP_DEBUG ZEND_DEBUG
-@@ -448,6 +455,10 @@
+@@ -448,6 +455,10 @@ END_EXTERN_C()
  #endif
  #endif /* !XtOffsetOf */
  
@@ -1774,10 +1774,10 @@ diff -Nura php-5.2.9/main/php.h suhosin-patch-5.2.9-0.9.7/main/php.h
  #endif
  
  /*
-diff -Nura php-5.2.9/main/php_config.h.in suhosin-patch-5.2.9-0.9.7/main/php_config.h.in
---- php-5.2.9/main/php_config.h.in	2009-02-25 16:39:45.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/main/php_config.h.in	2009-03-05 21:11:35.000000000 +0100
-@@ -809,6 +809,9 @@
+diff -urNp -x '*.orig' php-5.2.17.org/main/php_config.h.in php-5.2.17/main/php_config.h.in
+--- php-5.2.17.org/main/php_config.h.in	2021-10-23 19:10:35.053125065 +0200
++++ php-5.2.17/main/php_config.h.in	2021-10-23 19:10:37.433125065 +0200
+@@ -812,6 +812,9 @@
  /* Define if the target system has /dev/urandom device */
  #undef HAVE_DEV_URANDOM
  
@@ -1787,10 +1787,10 @@ diff -Nura php-5.2.9/main/php_config.h.in suhosin-patch-5.2.9-0.9.7/main/php_con
  /* Whether you have AOLserver */
  #undef HAVE_AOLSERVER
  
-diff -Nura php-5.2.9/main/php_logos.c suhosin-patch-5.2.9-0.9.7/main/php_logos.c
---- php-5.2.9/main/php_logos.c	2008-12-31 12:17:47.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/main/php_logos.c	2009-03-05 21:11:35.000000000 +0100
-@@ -50,6 +50,10 @@
+diff -urNp -x '*.orig' php-5.2.17.org/main/php_logos.c php-5.2.17/main/php_logos.c
+--- php-5.2.17.org/main/php_logos.c	2021-10-23 19:10:34.993125065 +0200
++++ php-5.2.17/main/php_logos.c	2021-10-23 19:10:37.433125065 +0200
+@@ -50,6 +50,10 @@ PHPAPI int php_unregister_info_logo(char
  	return zend_hash_del(&phpinfo_logo_hash, logo_string, strlen(logo_string));
  }
  
@@ -1801,7 +1801,7 @@ diff -Nura php-5.2.9/main/php_logos.c suhosin-patch-5.2.9-0.9.7/main/php_logos.c
  int php_init_info_logos(void)
  {
  	if(zend_hash_init(&phpinfo_logo_hash, 0, NULL, NULL, 1)==FAILURE) 
-@@ -63,6 +63,9 @@
+@@ -59,6 +63,9 @@ int php_init_info_logos(void)
  	php_register_info_logo(PHP_EGG_LOGO_GUID, "image/gif", php_egg_logo, sizeof(php_egg_logo));
  	php_register_info_logo(ZEND_LOGO_GUID   , "image/gif", zend_logo   , sizeof(zend_logo));
  	php_register_info_logo(PLD_LOGO_GUID    , "image/png", pld_logo    , sizeof(pld_logo));
@@ -1811,10 +1811,10 @@ diff -Nura php-5.2.9/main/php_logos.c suhosin-patch-5.2.9-0.9.7/main/php_logos.c
  
  	return SUCCESS;
  }
-diff -Nura php-5.2.9/main/snprintf.c suhosin-patch-5.2.9-0.9.7/main/snprintf.c
---- php-5.2.9/main/snprintf.c	2008-12-31 12:17:48.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/main/snprintf.c	2009-03-05 21:11:35.000000000 +0100
-@@ -1077,7 +1077,11 @@
+diff -urNp -x '*.orig' php-5.2.17.org/main/snprintf.c php-5.2.17/main/snprintf.c
+--- php-5.2.17.org/main/snprintf.c	2021-10-23 19:10:34.986458398 +0200
++++ php-5.2.17/main/snprintf.c	2021-10-23 19:10:37.433125065 +0200
+@@ -1077,7 +1077,11 @@ static int format_converter(register buf
  
  
  				case 'n':
@@ -1826,10 +1826,10 @@ diff -Nura php-5.2.9/main/snprintf.c suhosin-patch-5.2.9-0.9.7/main/snprintf.c
  					goto skip_output;
  
  					/*
-diff -Nura php-5.2.9/main/spprintf.c suhosin-patch-5.2.9-0.9.7/main/spprintf.c
---- php-5.2.9/main/spprintf.c	2009-02-04 16:03:12.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/main/spprintf.c	2009-03-05 21:11:35.000000000 +0100
-@@ -682,7 +682,11 @@
+diff -urNp -x '*.orig' php-5.2.17.org/main/spprintf.c php-5.2.17/main/spprintf.c
+--- php-5.2.17.org/main/spprintf.c	2021-10-23 19:10:34.986458398 +0200
++++ php-5.2.17/main/spprintf.c	2021-10-23 19:10:37.433125065 +0200
+@@ -683,7 +683,11 @@ static void xbuf_format_converter(smart_
  
  
  				case 'n':
@@ -1841,9 +1841,9 @@ diff -Nura php-5.2.9/main/spprintf.c suhosin-patch-5.2.9-0.9.7/main/spprintf.c
  					goto skip_output;
  
  					/*
-diff -Nura php-5.2.9/main/suhosin_globals.h suhosin-patch-5.2.9-0.9.7/main/suhosin_globals.h
---- php-5.2.9/main/suhosin_globals.h	1970-01-01 01:00:00.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/main/suhosin_globals.h	2009-03-05 21:11:35.000000000 +0100
+diff -urNp -x '*.orig' php-5.2.17.org/main/suhosin_globals.h php-5.2.17/main/suhosin_globals.h
+--- php-5.2.17.org/main/suhosin_globals.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/main/suhosin_globals.h	2021-10-23 19:10:37.436458399 +0200
 @@ -0,0 +1,61 @@
 +/*
 +   +----------------------------------------------------------------------+
@@ -1906,9 +1906,9 @@ diff -Nura php-5.2.9/main/suhosin_globals.h suhosin-patch-5.2.9-0.9.7/main/suhos
 + * c-basic-offset: 4
 + * End:
 + */
-diff -Nura php-5.2.9/main/suhosin_logo.h suhosin-patch-5.2.9-0.9.7/main/suhosin_logo.h
---- php-5.2.9/main/suhosin_logo.h	1970-01-01 01:00:00.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/main/suhosin_logo.h	2009-03-05 21:11:35.000000000 +0100
+diff -urNp -x '*.orig' php-5.2.17.org/main/suhosin_logo.h php-5.2.17/main/suhosin_logo.h
+--- php-5.2.17.org/main/suhosin_logo.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/main/suhosin_logo.h	2021-10-23 19:10:37.436458399 +0200
 @@ -0,0 +1,178 @@
 +static unsigned char suhosin_logo[] =
 +	"\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x48"
@@ -2088,9 +2088,9 @@ diff -Nura php-5.2.9/main/suhosin_logo.h suhosin-patch-5.2.9-0.9.7/main/suhosin_
 +	"\x21\xb6\x99\x69\xbc\x25\xb6\xdb\x6d\x18\xc2\x10\xda\x12\x94\xa1"
 +	"\x38\xc2\x53\x8c\x63\x18\xc7\x9d\xbe\x7f\xff\xd9"
 +	;
-diff -Nura php-5.2.9/main/suhosin_patch.c suhosin-patch-5.2.9-0.9.7/main/suhosin_patch.c
---- php-5.2.9/main/suhosin_patch.c	1970-01-01 01:00:00.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/main/suhosin_patch.c	2009-03-05 21:11:35.000000000 +0100
+diff -urNp -x '*.orig' php-5.2.17.org/main/suhosin_patch.c php-5.2.17/main/suhosin_patch.c
+--- php-5.2.17.org/main/suhosin_patch.c	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/main/suhosin_patch.c	2021-10-23 19:10:37.436458399 +0200
 @@ -0,0 +1,380 @@
 +/*
 +   +----------------------------------------------------------------------+
@@ -2472,9 +2472,9 @@ diff -Nura php-5.2.9/main/suhosin_patch.c suhosin-patch-5.2.9-0.9.7/main/suhosin
 + * vim600: sw=4 ts=4 fdm=marker
 + * vim<600: sw=4 ts=4
 + */
-diff -Nura php-5.2.9/main/suhosin_patch.h suhosin-patch-5.2.9-0.9.7/main/suhosin_patch.h
---- php-5.2.9/main/suhosin_patch.h	1970-01-01 01:00:00.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/main/suhosin_patch.h	2009-03-05 21:40:19.000000000 +0100
+diff -urNp -x '*.orig' php-5.2.17.org/main/suhosin_patch.h php-5.2.17/main/suhosin_patch.h
+--- php-5.2.17.org/main/suhosin_patch.h	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/main/suhosin_patch.h	2021-10-23 19:10:37.436458399 +0200
 @@ -0,0 +1,40 @@
 +/*
 +   +----------------------------------------------------------------------+
@@ -2516,9 +2516,9 @@ diff -Nura php-5.2.9/main/suhosin_patch.h suhosin-patch-5.2.9-0.9.7/main/suhosin
 + * c-basic-offset: 4
 + * End:
 + */
-diff -Nura php-5.2.9/main/suhosin_patch.m4 suhosin-patch-5.2.9-0.9.7/main/suhosin_patch.m4
---- php-5.2.9/main/suhosin_patch.m4	1970-01-01 01:00:00.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/main/suhosin_patch.m4	2009-03-05 21:11:35.000000000 +0100
+diff -urNp -x '*.orig' php-5.2.17.org/main/suhosin_patch.m4 php-5.2.17/main/suhosin_patch.m4
+--- php-5.2.17.org/main/suhosin_patch.m4	1970-01-01 01:00:00.000000000 +0100
++++ php-5.2.17/main/suhosin_patch.m4	2021-10-23 19:10:37.436458399 +0200
 @@ -0,0 +1,8 @@
 +dnl
 +dnl $Id$
@@ -2528,10 +2528,10 @@ diff -Nura php-5.2.9/main/suhosin_patch.m4 suhosin-patch-5.2.9-0.9.7/main/suhosi
 +
 +AC_DEFINE(SUHOSIN_PATCH, 1, [Suhosin Patch])
 +
-diff -Nura php-5.2.9/sapi/apache/mod_php5.c suhosin-patch-5.2.9-0.9.7/sapi/apache/mod_php5.c
---- php-5.2.9/sapi/apache/mod_php5.c	2008-12-31 12:17:48.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/sapi/apache/mod_php5.c	2009-03-05 21:11:35.000000000 +0100
-@@ -951,7 +951,11 @@
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/apache/mod_php5.c php-5.2.17/sapi/apache/mod_php5.c
+--- php-5.2.17.org/sapi/apache/mod_php5.c	2021-10-23 19:10:34.983125065 +0200
++++ php-5.2.17/sapi/apache/mod_php5.c	2021-10-23 19:10:37.436458399 +0200
+@@ -953,7 +953,11 @@ static void php_init_handler(server_rec
  	{
  		TSRMLS_FETCH();
  		if (PG(expose_php)) {
@@ -2543,10 +2543,10 @@ diff -Nura php-5.2.9/sapi/apache/mod_php5.c suhosin-patch-5.2.9-0.9.7/sapi/apach
  		}
  	}
  #endif
-diff -Nura php-5.2.9/sapi/apache2filter/sapi_apache2.c suhosin-patch-5.2.9-0.9.7/sapi/apache2filter/sapi_apache2.c
---- php-5.2.9/sapi/apache2filter/sapi_apache2.c	2008-12-31 12:17:48.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/sapi/apache2filter/sapi_apache2.c	2009-03-05 21:11:35.000000000 +0100
-@@ -566,7 +566,11 @@
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/apache2filter/sapi_apache2.c php-5.2.17/sapi/apache2filter/sapi_apache2.c
+--- php-5.2.17.org/sapi/apache2filter/sapi_apache2.c	2021-10-23 19:10:34.983125065 +0200
++++ php-5.2.17/sapi/apache2filter/sapi_apache2.c	2021-10-23 19:10:37.436458399 +0200
+@@ -568,7 +568,11 @@ static void php_apache_add_version(apr_p
  {
  	TSRMLS_FETCH();
  	if (PG(expose_php)) {
@@ -2558,10 +2558,10 @@ diff -Nura php-5.2.9/sapi/apache2filter/sapi_apache2.c suhosin-patch-5.2.9-0.9.7
  	}
  }
  
-diff -Nura php-5.2.9/sapi/apache2handler/sapi_apache2.c suhosin-patch-5.2.9-0.9.7/sapi/apache2handler/sapi_apache2.c
---- php-5.2.9/sapi/apache2handler/sapi_apache2.c	2008-12-31 12:17:48.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/sapi/apache2handler/sapi_apache2.c	2009-03-05 21:11:35.000000000 +0100
-@@ -370,7 +370,11 @@
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/apache2handler/sapi_apache2.c php-5.2.17/sapi/apache2handler/sapi_apache2.c
+--- php-5.2.17.org/sapi/apache2handler/sapi_apache2.c	2021-10-23 19:10:34.983125065 +0200
++++ php-5.2.17/sapi/apache2handler/sapi_apache2.c	2021-10-23 19:10:37.436458399 +0200
+@@ -377,7 +377,11 @@ static void php_apache_add_version(apr_p
  {
  	TSRMLS_FETCH();
  	if (PG(expose_php)) {
@@ -2573,10 +2573,10 @@ diff -Nura php-5.2.9/sapi/apache2handler/sapi_apache2.c suhosin-patch-5.2.9-0.9.
  	}
  }
  
-diff -Nura php-5.2.9/sapi/cgi/cgi_main.c suhosin-patch-5.2.9-0.9.7/sapi/cgi/cgi_main.c
---- php-5.2.9/sapi/cgi/cgi_main.c	2009-01-19 19:17:59.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/sapi/cgi/cgi_main.c	2009-03-05 21:11:35.000000000 +0100
-@@ -1797,11 +1797,19 @@
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cgi/cgi_main.c php-5.2.17/sapi/cgi/cgi_main.c
+--- php-5.2.17.org/sapi/cgi/cgi_main.c	2021-10-23 19:10:35.053125065 +0200
++++ php-5.2.17/sapi/cgi/cgi_main.c	2021-10-23 19:10:37.436458399 +0200
+@@ -1969,11 +1969,19 @@ consult the installation file that came
  							SG(headers_sent) = 1;
  							SG(request_info).no_headers = 1;
  						}
@@ -2596,10 +2596,10 @@ diff -Nura php-5.2.9/sapi/cgi/cgi_main.c suhosin-patch-5.2.9-0.9.7/sapi/cgi/cgi_
  						php_request_shutdown((void *) 0);
  						exit_status = 0;
  						goto out;
-diff -Nura php-5.2.9/sapi/cli/php_cli.c suhosin-patch-5.2.9-0.9.7/sapi/cli/php_cli.c
---- php-5.2.9/sapi/cli/php_cli.c	2008-12-31 12:17:49.000000000 +0100
-+++ suhosin-patch-5.2.9-0.9.7/sapi/cli/php_cli.c	2009-03-05 21:11:35.000000000 +0100
-@@ -772,8 +772,14 @@
+diff -urNp -x '*.orig' php-5.2.17.org/sapi/cli/php_cli.c php-5.2.17/sapi/cli/php_cli.c
+--- php-5.2.17.org/sapi/cli/php_cli.c	2021-10-23 19:10:34.983125065 +0200
++++ php-5.2.17/sapi/cli/php_cli.c	2021-10-23 19:10:37.436458399 +0200
+@@ -804,8 +804,14 @@ int main(int argc, char *argv[])
  				}
  
  				request_started = 1;
@@ -2616,10 +2616,10 @@ diff -Nura php-5.2.9/sapi/cli/php_cli.c suhosin-patch-5.2.9-0.9.7/sapi/cli/php_c
  #if ZEND_DEBUG && defined(HAVE_GCOV)
  					"(DEBUG GCOV)",
  #elif ZEND_DEBUG
-diff -Nura php-5.2.9/win32/build/config.w32 suhosin-patch-5.2.9-0.9.7/win32/build/config.w32
---- php-5.2.9/win32/build/config.w32	2008-10-11 01:38:14.000000000 +0200
-+++ suhosin-patch-5.2.9-0.9.7/win32/build/config.w32	2009-03-05 21:11:35.000000000 +0100
-@@ -305,7 +305,7 @@
+diff -urNp -x '*.orig' php-5.2.17.org/win32/build/config.w32 php-5.2.17/win32/build/config.w32
+--- php-5.2.17.org/win32/build/config.w32	2009-03-13 15:39:08.000000000 +0100
++++ php-5.2.17/win32/build/config.w32	2021-10-23 19:10:37.436458399 +0200
+@@ -305,7 +305,7 @@ ADD_SOURCES("Zend", "zend_language_parse
  	zend_sprintf.c zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c \
  	zend_stream.c zend_iterators.c zend_interfaces.c zend_objects.c \
  	zend_object_handlers.c zend_objects_API.c \
@@ -2628,7 +2628,7 @@ diff -Nura php-5.2.9/win32/build/config.w32 suhosin-patch-5.2.9-0.9.7/win32/buil
  
  ADD_SOURCES("main", "main.c snprintf.c spprintf.c safe_mode.c fopen_wrappers.c \
  	php_scandir.c php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
-@@ -350,6 +350,8 @@
+@@ -354,6 +354,8 @@ if (PHP_ZEND_MULTIBYTE == "yes") {
  AC_DEFINE('HAVE_USLEEP', 1);
  AC_DEFINE('HAVE_STRCOLL', 1);
  
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/f9fed404a21127d54adeafb03c9eea71f3ed9301



More information about the pld-cvs-commit mailing list