[packages/php/PHP_5_6] - rediff patches, merged duplicate triggers

baggins baggins at pld-linux.org
Mon Aug 23 23:33:21 CEST 2021


commit 791b59e46ce05866a6261f288519a14372252d6f
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Aug 23 23:32:47 2021 +0200

    - rediff patches, merged duplicate triggers

 mysql-lib-ver-mismatch.patch      |  26 +++---
 openssl.patch                     |  43 +++++-----
 pcre-shared.patch                 |  75 +++++++++---------
 phar-hash-shared.patch            |  32 ++++----
 php-both-apxs.patch               |   9 ++-
 php-builddir.patch                |  18 ++---
 php-config-dir.patch              |  19 ++---
 php-db.patch                      |  11 +--
 php-fcgi-graceful.patch           |  21 ++---
 php-fpm-config.patch              | 105 +++++++++++++------------
 php-icu64.patch                   | 161 +++++++++++++++++++++-----------------
 php-libtool.patch                 |   9 ++-
 php-mail.patch                    |  17 ++--
 php-mysql-charsetphpini.patch     |  44 +++++------
 php-mysqli-charsetphpini.patch    |  31 ++++----
 php-pdo_mysql-charsetphpini.patch |  29 ++++---
 php-pear.patch                    |  22 +++---
 php-shared.patch                  | 125 +++++++++++++++--------------
 php-tds.patch                     |  13 +--
 php-zlib-for-getimagesize.patch   |  17 ++--
 php.spec                          |   4 +-
 spl-shared.patch                  |  74 ++++++++++--------
 22 files changed, 484 insertions(+), 421 deletions(-)
---
diff --git a/php.spec b/php.spec
index ba3b44d..5f01c3a 100644
--- a/php.spec
+++ b/php.spec
@@ -2956,7 +2956,7 @@ fi
 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
 [ ! -f /etc/httpd/conf.d/??_mod_php.conf ] || %service -q httpd restart
 
-%triggerpostun common -- php-common < 4:5.3.28-7
+%triggerpostun common -- %{name}-common < 4:5.6.4-2, php-common < 4:5.6.4-2
 # migrate configs /etc/php/conf.d -> /etc/phpXY/conf.d/
 # do config migration in php-common trigger, as the trigger is ran after all packages are upgraded
 # this way we can stick to one trigger, instead of attaching one for each (sub)package!
@@ -2976,8 +2976,6 @@ for f in /etc/php/*.ini.rpmsave /etc/php/*.d/*.ini.rpmsave; do
 		s#/etc/php#%{_sysconfdir}#
 	' $nf
 done
-
-%triggerpostun common -- %{name}-common < 4:5.6.4-2, php-common < 4:5.6.4-2
 # switch to browscap package if the ini file has original value
 %{__sed} -i -e 's#%{_sysconfdir}/browscap.ini#/usr/share/browscap/php_browscap.ini#' %{_sysconfdir}/php.ini
 # disable browscap, if optional package not present
diff --git a/mysql-lib-ver-mismatch.patch b/mysql-lib-ver-mismatch.patch
index d49d195..3a0c70a 100644
--- a/mysql-lib-ver-mismatch.patch
+++ b/mysql-lib-ver-mismatch.patch
@@ -1,22 +1,24 @@
---- php-5.3.27/ext/mysqli/mysqli_nonapi.c~	2013-11-20 00:19:11.000000000 +0200
-+++ php-5.3.27/ext/mysqli/mysqli_nonapi.c	2013-11-20 00:19:44.725872552 +0200
-@@ -73,7 +73,7 @@
- 	zend_bool			self_alloced = 0;
- 
+diff -urNp -x '*.orig' php-5.6.40.org/ext/mysql/php_mysql.c php-5.6.40/ext/mysql/php_mysql.c
+--- php-5.6.40.org/ext/mysql/php_mysql.c	2021-08-23 23:20:26.062396879 +0200
++++ php-5.6.40/ext/mysql/php_mysql.c	2021-08-23 23:20:27.092395795 +0200
+@@ -738,7 +738,7 @@ static void php_mysql_do_connect(INTERNA
+                      E_DEPRECATED,
+                      "The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead");
  
 -#if !defined(MYSQL_USE_MYSQLND)
 +#if 0 && !defined(MYSQL_USE_MYSQLND)
  	if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() / 100)) {
- 		php_error_docref(NULL TSRMLS_CC, E_NOTICE,
+ 		php_error_docref(NULL TSRMLS_CC, E_WARNING,
  						"Headers and client library minor version mismatch. Headers:%d Library:%ld",
---- php-5.3.27/ext/mysql/php_mysql.c~	2013-11-20 00:19:11.000000000 +0200
-+++ php-5.3.27/ext/mysql/php_mysql.c	2013-11-20 00:20:01.719956531 +0200
-@@ -704,7 +704,7 @@
- 	zend_bool free_host=0, new_link=0;
- 	long connect_timeout;
+diff -urNp -x '*.orig' php-5.6.40.org/ext/mysqli/mysqli_nonapi.c php-5.6.40/ext/mysqli/mysqli_nonapi.c
+--- php-5.6.40.org/ext/mysqli/mysqli_nonapi.c	2021-08-23 23:20:26.062396879 +0200
++++ php-5.6.40/ext/mysqli/mysqli_nonapi.c	2021-08-23 23:20:27.092395795 +0200
+@@ -74,7 +74,7 @@ void mysqli_common_connect(INTERNAL_FUNC
+ 	zend_bool			self_alloced = 0;
+ 
  
 -#if !defined(MYSQL_USE_MYSQLND)
 +#if 0 && !defined(MYSQL_USE_MYSQLND)
  	if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() / 100)) {
- 		php_error_docref(NULL TSRMLS_CC, E_NOTICE,
+ 		php_error_docref(NULL TSRMLS_CC, E_WARNING,
  						"Headers and client library minor version mismatch. Headers:%d Library:%ld",
diff --git a/openssl.patch b/openssl.patch
index 07a84b9..f653440 100644
--- a/openssl.patch
+++ b/openssl.patch
@@ -1,5 +1,6 @@
---- php-5.6.38/ext/openssl/openssl.c	2018-09-12 00:12:36.000000000 +0200
-+++ php-5.6.38/ext/openssl/openssl.c	2018-09-14 14:30:33.582224863 +0200
+diff -urNp -x '*.orig' php-5.6.40.org/ext/openssl/openssl.c php-5.6.40/ext/openssl/openssl.c
+--- php-5.6.40.org/ext/openssl/openssl.c	2021-08-23 23:18:57.552489303 +0200
++++ php-5.6.40/ext/openssl/openssl.c	2021-08-23 23:18:58.475821680 +0200
 @@ -531,6 +531,14 @@ zend_module_entry openssl_module_entry =
  ZEND_GET_MODULE(openssl)
  #endif
@@ -691,7 +692,7 @@
  
  	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szza/|s", &data, &data_len, &sealdata, &ekeys, &pubkeys, &method, &method_len) == FAILURE) {
  		return;
-@@ -4967,9 +5115,10 @@ PHP_FUNCTION(openssl_seal)
+@@ -4968,9 +5116,10 @@ PHP_FUNCTION(openssl_seal)
  		i++;
  	}
  
@@ -704,7 +705,7 @@
  		goto clean_exit;
  	}
  
-@@ -4979,15 +5128,15 @@ PHP_FUNCTION(openssl_seal)
+@@ -4980,15 +5129,15 @@ PHP_FUNCTION(openssl_seal)
  	iv = ivlen ? emalloc(ivlen + 1) : NULL;
  #endif
  	/* allocate one byte extra to make room for \0 */
@@ -726,14 +727,16 @@
  		goto clean_exit;
  	}
  
-@@ -5018,5 +5167,5 @@ PHP_FUNCTION(openssl_seal)
+@@ -5019,7 +5168,7 @@ PHP_FUNCTION(openssl_seal)
  		efree(buf);
  	}
  	RETVAL_LONG(len1 + len2);
 -	EVP_CIPHER_CTX_cleanup(&ctx);
 +	EVP_CIPHER_CTX_free(ctx);
  
-@@ -5045,7 +5194,7 @@ PHP_FUNCTION(openssl_open)
+ clean_exit:
+ 	for (i=0; i<nkeys; i++) {
+@@ -5046,7 +5195,7 @@ PHP_FUNCTION(openssl_open)
  	int len1, len2;
  	unsigned char *buf;
  	long keyresource = -1;
@@ -742,7 +745,7 @@
  	char * data;	int data_len;
  	char * ekey;	int ekey_len;
  	char *method =NULL;
-@@ -5071,27 +5220,26 @@ PHP_FUNCTION(openssl_open)
+@@ -5072,27 +5221,26 @@ PHP_FUNCTION(openssl_open)
  	} else {
  		cipher = EVP_rc4();
  	}
@@ -782,7 +785,7 @@
  }
  /* }}} */
  
-@@ -5151,7 +5299,7 @@ PHP_FUNCTION(openssl_digest)
+@@ -5152,7 +5300,7 @@ PHP_FUNCTION(openssl_digest)
  	char *data, *method;
  	int data_len, method_len;
  	const EVP_MD *mdtype;
@@ -791,7 +794,7 @@
  	int siglen;
  	unsigned char *sigbuf;
  
-@@ -5167,9 +5315,10 @@ PHP_FUNCTION(openssl_digest)
+@@ -5168,9 +5316,10 @@ PHP_FUNCTION(openssl_digest)
  	siglen = EVP_MD_size(mdtype);
  	sigbuf = emalloc(siglen + 1);
  
@@ -805,7 +808,7 @@
  		if (raw_output) {
  			sigbuf[siglen] = '\0';
  			RETVAL_STRINGL((char *)sigbuf, siglen, 0);
-@@ -5185,6 +5334,8 @@ PHP_FUNCTION(openssl_digest)
+@@ -5186,6 +5335,8 @@ PHP_FUNCTION(openssl_digest)
  		efree(sigbuf);
  		RETVAL_FALSE;
  	}
@@ -814,7 +817,7 @@
  }
  /* }}} */
  
-@@ -5230,7 +5381,7 @@ PHP_FUNCTION(openssl_encrypt)
+@@ -5231,7 +5382,7 @@ PHP_FUNCTION(openssl_encrypt)
  	char *data, *method, *password, *iv = "";
  	int data_len, method_len, password_len, iv_len = 0, max_iv_len;
  	const EVP_CIPHER *cipher_type;
@@ -823,7 +826,7 @@
  	int i=0, outlen, keylen;
  	unsigned char *outbuf, *key;
  	zend_bool free_iv;
-@@ -5244,6 +5395,12 @@ PHP_FUNCTION(openssl_encrypt)
+@@ -5245,6 +5396,12 @@ PHP_FUNCTION(openssl_encrypt)
  		RETURN_FALSE;
  	}
  
@@ -836,7 +839,7 @@
  	keylen = EVP_CIPHER_key_length(cipher_type);
  	if (keylen > password_len) {
  		key = emalloc(keylen);
-@@ -5262,19 +5419,19 @@ PHP_FUNCTION(openssl_encrypt)
+@@ -5263,19 +5420,19 @@ PHP_FUNCTION(openssl_encrypt)
  	outlen = data_len + EVP_CIPHER_block_size(cipher_type);
  	outbuf = safe_emalloc(outlen, 1, 1);
  
@@ -862,7 +865,7 @@
  		outlen += i;
  		if (options & OPENSSL_RAW_DATA) {
  			outbuf[outlen] = '\0';
-@@ -5301,7 +5458,7 @@ PHP_FUNCTION(openssl_encrypt)
+@@ -5302,7 +5459,7 @@ PHP_FUNCTION(openssl_encrypt)
  	if (free_iv) {
  		efree(iv);
  	}
@@ -871,7 +874,7 @@
  }
  /* }}} */
  
-@@ -5313,7 +5470,7 @@ PHP_FUNCTION(openssl_decrypt)
+@@ -5314,7 +5471,7 @@ PHP_FUNCTION(openssl_decrypt)
  	char *data, *method, *password, *iv = "";
  	int data_len, method_len, password_len, iv_len = 0;
  	const EVP_CIPHER *cipher_type;
@@ -880,7 +883,7 @@
  	int i, outlen, keylen;
  	unsigned char *outbuf, *key;
  	int base64_str_len;
-@@ -5335,10 +5492,17 @@ PHP_FUNCTION(openssl_decrypt)
+@@ -5336,10 +5493,17 @@ PHP_FUNCTION(openssl_decrypt)
  		RETURN_FALSE;
  	}
  
@@ -898,7 +901,7 @@
  			RETURN_FALSE;
  		}
  		data_len = base64_str_len;
-@@ -5359,17 +5523,17 @@ PHP_FUNCTION(openssl_decrypt)
+@@ -5360,17 +5524,17 @@ PHP_FUNCTION(openssl_decrypt)
  	outlen = data_len + EVP_CIPHER_block_size(cipher_type);
  	outbuf = emalloc(outlen + 1);
  
@@ -922,7 +925,7 @@
  		outlen += i;
  		outbuf[outlen] = '\0';
  		RETVAL_STRINGL((char *)outbuf, outlen, 0);
-@@ -5386,7 +5550,7 @@ PHP_FUNCTION(openssl_decrypt)
+@@ -5387,7 +5551,7 @@ PHP_FUNCTION(openssl_decrypt)
  	if (base64_str) {
  		efree(base64_str);
  	}
@@ -931,7 +934,7 @@
  }
  /* }}} */
  
-@@ -5424,6 +5588,7 @@ PHP_FUNCTION(openssl_dh_compute_key)
+@@ -5425,6 +5589,7 @@ PHP_FUNCTION(openssl_dh_compute_key)
  	zval *key;
  	char *pub_str;
  	int pub_len;
@@ -939,7 +942,7 @@
  	EVP_PKEY *pkey;
  	BIGNUM *pub;
  	char *data;
-@@ -5433,14 +5598,18 @@ PHP_FUNCTION(openssl_dh_compute_key)
+@@ -5434,14 +5599,18 @@ PHP_FUNCTION(openssl_dh_compute_key)
  		return;
  	}
  	ZEND_FETCH_RESOURCE(pkey, EVP_PKEY *, &key, -1, "OpenSSL key", le_key);
diff --git a/pcre-shared.patch b/pcre-shared.patch
index 642207d..38b96ad 100644
--- a/pcre-shared.patch
+++ b/pcre-shared.patch
@@ -1,6 +1,7 @@
---- php-5.5.0alpha6/ext/pcre/config0.m4~	2013-03-19 18:08:15.000000000 +0200
-+++ php-5.5.0alpha6/ext/pcre/config0.m4	2013-03-19 18:09:26.732804962 +0200
-@@ -11,7 +11,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/pcre/config0.m4 php-5.6.40/ext/pcre/config0.m4
+--- php-5.6.40.org/ext/pcre/config0.m4	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/pcre/config0.m4	2021-08-23 23:20:07.852416018 +0200
+@@ -11,7 +11,7 @@ PHP_ARG_WITH(pcre-regex,,
  
    if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then
      AC_MSG_CHECKING([for PCRE headers location])
@@ -9,7 +10,7 @@
        test -f $i/pcre.h && PCRE_INCDIR=$i
      done
  
-@@ -21,7 +21,7 @@
+@@ -21,7 +21,7 @@ PHP_ARG_WITH(pcre-regex,,
      AC_MSG_RESULT([$PCRE_INCDIR])
  
      AC_MSG_CHECKING([for PCRE library location])
@@ -18,7 +19,7 @@
        test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j
      done
      
-@@ -43,12 +43,13 @@
+@@ -43,12 +43,13 @@ PHP_ARG_WITH(pcre-regex,,
        AC_MSG_ERROR([The PCRE extension requires PCRE library version >= 6.6])
      fi
  
@@ -34,32 +35,18 @@
    else
      AC_MSG_CHECKING([for PCRE library to use])
      AC_MSG_RESULT([bundled])
-@@ -61,7 +61,7 @@
-     				 pcrelib/pcre_tables.c pcrelib/pcre_valid_utf8.c \
-     				 pcrelib/pcre_version.c pcrelib/pcre_xclass.c"
+@@ -61,7 +62,7 @@ PHP_ARG_WITH(pcre-regex,,
+     				 pcrelib/pcre_version.c pcrelib/pcre_xclass.c \
+     				 pcrelib/pcre_jit_compile.c"
      PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I at ext_srcdir@/pcrelib"
 -    PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS)
 +    PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, $ext_shared,,$PHP_PCRE_CFLAGS)
      PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
      PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/])
      AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
---- php-5.3.1/ext/pcre/php_pcre.h	2009-11-30 20:59:04.046581246 +0200
-+++ php-5.3.1.pcre/ext/pcre/php_pcre.h	2009-11-30 21:38:06.435493243 +0000
-@@ -34,7 +34,12 @@
- #endif
- 
- PHPAPI char *php_pcre_replace(char *regex, int regex_len, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int *result_len, int limit, int *replace_count TSRMLS_DC);
-+#if COMPILE_DL_PCRE
-+#define pcre_get_compiled_regex pcre_get_compiled_regex_p
-+extern PHPAPI pcre* (*pcre_get_compiled_regex)(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
-+#else
- PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
-+#endif
- PHPAPI pcre* pcre_get_compiled_regex_ex(char *regex, pcre_extra **extra, int *preg_options, int *coptions TSRMLS_DC);
- 
- extern zend_module_entry pcre_module_entry;
---- php-5.3.1/ext/pcre/php_pcre.c	2009-11-30 21:10:01.370473754 +0200
-+++ php-5.3.1.pcre/ext/pcre/php_pcre.c	2009-11-30 21:38:01.759684456 +0000
+diff -urNp -x '*.orig' php-5.6.40.org/ext/pcre/php_pcre.c php-5.6.40/ext/pcre/php_pcre.c
+--- php-5.6.40.org/ext/pcre/php_pcre.c	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/pcre/php_pcre.c	2021-08-23 23:20:07.852416018 +0200
 @@ -27,6 +27,11 @@
  
  #if HAVE_PCRE || HAVE_BUNDLED_PCRE
@@ -72,7 +59,7 @@
  #include "ext/standard/php_string.h"
  
  #define PREG_PATTERN_ORDER			1
-@@ -153,6 +158,10 @@
+@@ -158,6 +163,10 @@ static PHP_MINIT_FUNCTION(pcre)
  	REGISTER_LONG_CONSTANT("PREG_BAD_UTF8_OFFSET_ERROR", PHP_PCRE_BAD_UTF8_OFFSET_ERROR, CONST_CS | CONST_PERSISTENT);
  	REGISTER_STRING_CONSTANT("PCRE_VERSION", (char *)pcre_version(), CONST_CS | CONST_PERSISTENT);
  
@@ -83,7 +70,7 @@
  	return SUCCESS;
  }
  /* }}} */
-@@ -429,6 +438,7 @@
+@@ -497,6 +506,7 @@ PHPAPI pcre_cache_entry* pcre_get_compil
  }
  /* }}} */
  
@@ -91,11 +78,28 @@
  /* {{{ pcre_get_compiled_regex
   */
  PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options TSRMLS_DC)
---- php-5.3.1/ext/standard/browscap.c	2009-06-06 02:40:49.000000000 +0000
-+++ php-5.3.1.pcre/ext/standard/browscap.c	2009-11-30 21:33:00.775241138 +0000
-@@ -31,6 +31,11 @@
- static zval *current_section;
- static char *current_section_name;
+diff -urNp -x '*.orig' php-5.6.40.org/ext/pcre/php_pcre.h php-5.6.40/ext/pcre/php_pcre.h
+--- php-5.6.40.org/ext/pcre/php_pcre.h	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/pcre/php_pcre.h	2021-08-23 23:20:07.852416018 +0200
+@@ -34,7 +34,12 @@
+ #endif
+ 
+ PHPAPI char *php_pcre_replace(char *regex, int regex_len, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int *result_len, int limit, int *replace_count TSRMLS_DC);
++#if COMPILE_DL_PCRE
++#define pcre_get_compiled_regex pcre_get_compiled_regex_p
++extern PHPAPI pcre* (*pcre_get_compiled_regex)(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
++#else
+ PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
++#endif
+ PHPAPI pcre* pcre_get_compiled_regex_ex(char *regex, pcre_extra **extra, int *preg_options, int *coptions TSRMLS_DC);
+ 
+ extern zend_module_entry pcre_module_entry;
+diff -urNp -x '*.orig' php-5.6.40.org/ext/standard/browscap.c php-5.6.40/ext/standard/browscap.c
+--- php-5.6.40.org/ext/standard/browscap.c	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/standard/browscap.c	2021-08-23 23:20:07.852416018 +0200
+@@ -51,6 +51,11 @@ ZEND_DECLARE_MODULE_GLOBALS(browscap)
+ #define BROWSCAP_G(v)	(browscap_globals.v)
+ #endif
  
 +#if COMPILE_DL_PCRE
 +// will be visible in here
@@ -105,9 +109,10 @@
  #define DEFAULT_SECTION_NAME "Default Browser Capability Settings"
  
  /* OBJECTS_FIXME: This whole extension needs going through. The use of objects looks pretty broken here */
---- php-5.3.2/sapi/cli/tests/018.phpt~	2008-03-17 16:05:39.000000000 +0200
-+++ php-5.3.2/sapi/cli/tests/018.phpt	2010-03-16 20:41:11.341251246 +0200
-@@ -20,8 +20,6 @@
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/cli/tests/018.phpt php-5.6.40/sapi/cli/tests/018.phpt
+--- php-5.6.40.org/sapi/cli/tests/018.phpt	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/sapi/cli/tests/018.phpt	2021-08-23 23:20:07.852416018 +0200
+@@ -20,8 +20,6 @@ echo "Done\n";
  --EXPECTF--     
  [PHP Modules]
  %a
diff --git a/phar-hash-shared.patch b/phar-hash-shared.patch
index 621fe6d..ce78c77 100644
--- a/phar-hash-shared.patch
+++ b/phar-hash-shared.patch
@@ -1,8 +1,21 @@
---- php-7.0.0RC6/ext/phar/config.m4	2015-11-17 19:13:50.877662712 +0200
-+++ php-7.0.0RC6/ext/phar/config.m4	2015-11-20 12:51:24.088185045 +0200
-@@ -7,13 +7,13 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/phar/Makefile.frag php-5.6.40/ext/phar/Makefile.frag
+--- php-5.6.40.org/ext/phar/Makefile.frag	2021-08-23 23:20:33.969055218 +0200
++++ php-5.6.40/ext/phar/Makefile.frag	2021-08-23 23:20:34.982387483 +0200
+@@ -9,7 +9,7 @@ PHP_PHARCMD_EXECUTABLE = ` \
+ 		$(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
+ 		if test "x$(PHP_MODULES)" != "x"; then \
+ 		$(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \
+-		for i in pcre spl bz2 zlib phar; do \
++		for i in pcre spl bz2 zlib hash phar; do \
+ 			if test -f "$(top_builddir)/modules/$$i.la"; then \
+ 				. $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
+ 			fi; \
+diff -urNp -x '*.orig' php-5.6.40.org/ext/phar/config.m4 php-5.6.40/ext/phar/config.m4
+--- php-5.6.40.org/ext/phar/config.m4	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/phar/config.m4	2021-08-23 23:20:34.982387483 +0200
+@@ -7,13 +7,13 @@ PHP_ARG_ENABLE(phar, for phar archive su
  if test "$PHP_PHAR" != "no"; then
-   PHP_NEW_EXTENSION(phar, util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
+   PHP_NEW_EXTENSION(phar, util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared)
    AC_MSG_CHECKING([for phar openssl support])
 -  if test "$PHP_HASH_SHARED" != "yes"; then
 -    if test "$PHP_HASH" != "no"; then
@@ -20,14 +33,3 @@
    if test "$PHP_OPENSSL_SHARED" = "yes"; then
      AC_MSG_RESULT([no (shared openssl)])
    else
---- php-7.0.0RC7/ext/phar/Makefile.frag~	2015-11-23 11:06:31.000000000 +0200
-+++ php-7.0.0RC7/ext/phar/Makefile.frag	2015-11-23 11:15:36.452443959 +0200
-@@ -9,7 +9,7 @@
- 		$(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
- 		if test "x$(PHP_MODULES)" != "x"; then \
- 		$(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \
--		for i in pcre spl bz2 zlib phar; do \
-+		for i in pcre spl bz2 zlib hash phar; do \
- 			if test -f "$(top_builddir)/modules/$$i.la"; then \
- 				. $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
- 			fi; \
diff --git a/php-both-apxs.patch b/php-both-apxs.patch
index 8e7bd89..c43170d 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.6.40.org/Makefile.global php-5.6.40/Makefile.global
+--- php-5.6.40.org/Makefile.global	2021-08-23 23:19:09.922476480 +0200
++++ php-5.6.40/Makefile.global	2021-08-23 23:19:11.015808679 +0200
+@@ -23,6 +23,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..f29f3fd 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.6.40.org/scripts/Makefile.frag php-5.6.40/scripts/Makefile.frag
+--- php-5.6.40.org/scripts/Makefile.frag	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/scripts/Makefile.frag	2021-08-23 23:19:13.635805958 +0200
 @@ -4,7 +4,7 @@
  #
  
@@ -10,15 +10,15 @@ 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
-@@ -3,7 +3,7 @@
- # Variable declaration
+diff -urNp -x '*.orig' php-5.6.40.org/scripts/phpize.in php-5.6.40/scripts/phpize.in
+--- php-5.6.40.org/scripts/phpize.in	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/scripts/phpize.in	2021-08-23 23:19:13.635805958 +0200
+@@ -4,7 +4,7 @@
  prefix='@prefix@'
+ datarootdir='@datarootdir@'
  exec_prefix="`eval echo @exec_prefix@`"
 -phpdir="`eval echo @libdir@`/build"
 +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..b873322 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.6.40.org/scripts/php-config.in php-5.6.40/scripts/php-config.in
+--- php-5.6.40.org/scripts/php-config.in	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/scripts/php-config.in	2021-08-23 23:19:24.372461461 +0200
+@@ -4,6 +4,7 @@ SED="@SED@"
  prefix="@prefix@"
+ datarootdir="@datarootdir@"
  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"
+@@ -55,6 +56,8 @@ case "$1" in
    echo $extension_dir;;
  --include-dir)
    echo $include_dir;;
@@ -17,11 +18,11 @@
  --php-binary)
    echo $php_binary;;
  --php-sapis)
-@@ -72,6 +75,7 @@
+@@ -76,6 +79,7 @@ Options:
    --ldflags           [$ldflags]
    --libs              [$libs]
    --extension-dir     [$extension_dir]
 +  --sysconfdir        [$sysconfdir]
    --include-dir       [$include_dir]
+   --man-dir           [$man_dir]
    --php-binary        [$php_binary]
-   --php-sapis         [$php_sapis]
diff --git a/php-db.patch b/php-db.patch
index 7b3a8df..c10ead5 100644
--- a/php-db.patch
+++ b/php-db.patch
@@ -1,8 +1,9 @@
---- php-5.6.17/ext/dba/config.m4~	2016-01-11 00:04:19.000000000 +0200
-+++ php-5.6.17/ext/dba/config.m4	2016-01-11 00:05:56.899471849 +0200
-@@ -287,6 +287,14 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/dba/config.m4 php-5.6.40/ext/dba/config.m4
+--- php-5.6.40.org/ext/dba/config.m4	2021-08-23 23:20:23.472399605 +0200
++++ php-5.6.40/ext/dba/config.m4	2021-08-23 23:20:24.499065191 +0200
+@@ -326,6 +326,14 @@ if test "$PHP_DB4" != "no"; then
        THIS_PREFIX=$i
-       THIS_INCLUDE=$i/db4/db.h
+       THIS_INCLUDE=$i/include/db5.3/db.h
        break
 +    elif test -f "$i/include/db5.3/db.h"; then
 +      THIS_PREFIX=$i
@@ -15,7 +16,7 @@
      elif test -f "$i/include/db5.1/db.h"; then
        THIS_PREFIX=$i
        THIS_INCLUDE=$i/include/db5.1/db.h
-@@ -376,7 +376,7 @@
+@@ -368,7 +376,7 @@ if test "$PHP_DB4" != "no"; then
        break
      fi
    done
diff --git a/php-fcgi-graceful.patch b/php-fcgi-graceful.patch
index 26f86f3..e779ba7 100644
--- a/php-fcgi-graceful.patch
+++ b/php-fcgi-graceful.patch
@@ -18,21 +18,22 @@ while ($i < 35) {
 echo "end!<br>\n";
 ?>
 
---- php-5.4.0alpha2/sapi/cgi/cgi_main.c~	2011-08-05 13:26:14.000000000 +0300
-+++ php-5.4.0alpha2/sapi/cgi/cgi_main.c	2011-08-05 13:57:17.564708456 +0300
-@@ -101,6 +101,9 @@
-  */
- static int parent = 1;
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/cgi/cgi_main.c php-5.6.40/sapi/cgi/cgi_main.c
+--- php-5.6.40.org/sapi/cgi/cgi_main.c	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/sapi/cgi/cgi_main.c	2021-08-23 23:19:27.222458494 +0200
+@@ -111,6 +111,9 @@ static void (*php_php_import_environment
+ static int children = 0;
+ 
  
 +/* Socket we are listening on incoming connections */
 +static int fcgi_fd = 0;
 +
  /**
-  * Process group
+  * Set to non-zero if we are the parent process
   */
-@@ -1221,6 +1224,21 @@
- 	exit(0);
+@@ -1461,6 +1464,21 @@ void fastcgi_cleanup(int signal)
  }
+ #endif
  
 +/**
 + * Graceful shutdown. Close listening sockets.
@@ -52,7 +53,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)
-@@ -1764,7 +1764,6 @@
+@@ -1759,7 +1777,6 @@ int main(int argc, char *argv[])
  	int requests = 0;
  	int fastcgi;
  	char *bindpath = NULL;
@@ -60,7 +61,7 @@ echo "end!<br>\n";
  	fcgi_request *request = NULL;
  	int repeats = 1;
  	int benchmark = 0;
-@@ -1579,9 +1596,13 @@
+@@ -2058,9 +2075,13 @@ consult the installation file that came
  					parent = 0;
  
  					/* don't catch our signals */
diff --git a/php-fpm-config.patch b/php-fpm-config.patch
index f3c0db0..316eb48 100644
--- a/php-fpm-config.patch
+++ b/php-fpm-config.patch
@@ -1,38 +1,22 @@
---- php-5.6.2/sapi/fpm/php-fpm.conf.in	2014-10-27 08:20:34.963718145 +0200
-+++ php-5.6.2.old/sapi/fpm/php-fpm.conf.in	2014-10-27 08:07:47.762117299 +0200
-@@ -14,14 +14,14 @@
- ; Pid file
- ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
- ; Default Value: none
--;pid = run/php-fpm.pid
-+pid = /var/run/@processname at .pid
- 
- ; Error log file
- ; If it's set to "syslog", log is sent to syslogd instead of being written
- ; in a local file.
- ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
- ; Default Value: log/php-fpm.log
--;error_log = log/php-fpm.log
-+error_log = /var/log/php/@processname at .log
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/fpm/Makefile.frag php-5.6.40/sapi/fpm/Makefile.frag
+--- php-5.6.40.org/sapi/fpm/Makefile.frag	2021-08-23 23:19:50.029101357 +0200
++++ php-5.6.40/sapi/fpm/Makefile.frag	2021-08-23 23:19:51.305766688 +0200
+@@ -12,8 +12,8 @@ install-fpm: $(SAPI_FPM_PATH)
  
- ; syslog_facility is used to specify what type of program is logging the
- ; message. This lets syslogd specify that messages from different facilities
-@@ -115,4 +115,11 @@
- ; ports and different management options.  The name of the pool will be
- ; used in logs and stats. There is no limitation on the number of pools which
- ; FPM can handle. Your system will tell you anyway :)
+ 	@echo "Installing PHP FPM config:        $(INSTALL_ROOT)$(sysconfdir)/" && \
+ 	$(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/fpm.d || :
+-	@$(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf.default || :
+-	@$(INSTALL_DATA) sapi/fpm/php-fpm.conf-d $(INSTALL_ROOT)$(sysconfdir)/fpm.d/www.conf.default || :
++	@$(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf || :
++	@$(INSTALL_DATA) sapi/fpm/php-fpm.conf-d $(INSTALL_ROOT)$(sysconfdir)/fpm.d/www.conf || :
  
-+; Include one or more files. If glob(3) exists, it is used to include a bunch of
-+; files from a glob(3) pattern. This directive can be used everywhere in the
-+; file.
-+; Relative path can also be used. They will be prefixed by:
-+;  - the global prefix if it's been set (-p argument)
-+;  - @prefix@ otherwise
-+include=/etc/php/fpm.d/*.conf
---- php-5.6.5/sapi/fpm/php-fpm.conf-d.in~	2015-02-04 19:26:16.000000000 +0200
-+++ php-5.6.5/sapi/fpm/php-fpm.conf-d.in	2015-02-04 19:27:25.275218535 +0200
-@@ -32,7 +32,7 @@
- ;                            specific port;
+ 	@echo "Installing PHP FPM man page:      $(INSTALL_ROOT)$(mandir)/man8/"
+ 	@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man8
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/fpm/php-fpm.conf-d.in php-5.6.40/sapi/fpm/php-fpm.conf-d.in
+--- php-5.6.40.org/sapi/fpm/php-fpm.conf-d.in	2021-08-23 23:19:50.029101357 +0200
++++ php-5.6.40/sapi/fpm/php-fpm.conf-d.in	2021-08-23 23:19:51.305766688 +0200
+@@ -35,7 +35,7 @@ group = @php_fpm_group@
+ ;                            (IPv6 and IPv4-mapped) on a specific port;
  ;   '/path/to/unix/socket' - to listen on a unix socket.
  ; Note: This value is mandatory.
 -listen = 127.0.0.1:9000
@@ -40,7 +24,7 @@
  
  ; Set listen(2) backlog.
  ; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
-@@ -46,9 +46,9 @@
+@@ -46,9 +46,9 @@ listen = 127.0.0.1:9000
  ; BSD-derived systems allow connections regardless of permissions. 
  ; Default Values: user and group are set as the running user
  ;                 mode is set to 0660
@@ -53,7 +37,7 @@
  ; When POSIX Access Control Lists are supported you can set them using
  ; these options, value is a comma separated list of user/group names.
  ; When set, listen.owner and listen.group are ignored
-@@ -53,7 +53,7 @@
+@@ -61,7 +61,7 @@ listen = 127.0.0.1:9000
  ; must be separated by a comma. If this value is left blank, connections will be
  ; accepted from any ip address.
  ; Default Value: any
@@ -62,7 +46,7 @@
  
  ; Specify the nice(2) priority to apply to the pool processes (only if set)
  ; The value can vary from -19 (highest priority) to 20 (lower priority)
-@@ -372,7 +372,7 @@
+@@ -386,7 +386,7 @@ pm.max_spare_servers = 3
  ; the current environment.
  ; Default Value: clean env
  ;env[HOSTNAME] = $HOSTNAME
@@ -71,8 +55,40 @@
  ;env[TMP] = /tmp
  ;env[TMPDIR] = /tmp
  ;env[TEMP] = /tmp
---- php-5.3.9/sapi/fpm/status.html.in~	2011-10-08 23:43:12.000000000 +0300
-+++ php-5.3.9/sapi/fpm/status.html.in	2012-01-12 02:19:09.573191879 +0200
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/fpm/php-fpm.conf.in php-5.6.40/sapi/fpm/php-fpm.conf.in
+--- php-5.6.40.org/sapi/fpm/php-fpm.conf.in	2021-08-23 23:19:50.029101357 +0200
++++ php-5.6.40/sapi/fpm/php-fpm.conf.in	2021-08-23 23:19:51.305766688 +0200
+@@ -14,14 +14,14 @@
+ ; Pid file
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: none
+-;pid = run/php-fpm.pid
++pid = /var/run/@processname at .pid
+ 
+ ; Error log file
+ ; If it's set to "syslog", log is sent to syslogd instead of being written
+ ; in a local file.
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: log/php-fpm.log
+-;error_log = log/php-fpm.log
++error_log = /var/log/php/@processname at .log
+ 
+ ; syslog_facility is used to specify what type of program is logging the
+ ; message. This lets syslogd specify that messages from different facilities
+@@ -116,3 +116,10 @@
+ ; used in logs and stats. There is no limitation on the number of pools which
+ ; FPM can handle. Your system will tell you anyway :)
+ 
++; Include one or more files. If glob(3) exists, it is used to include a bunch of
++; files from a glob(3) pattern. This directive can be used everywhere in the
++; file.
++; Relative path can also be used. They will be prefixed by:
++;  - the global prefix if it's been set (-p argument)
++;  - @prefix@ otherwise
++include=/etc/php/fpm.d/*.conf
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/fpm/status.html.in php-5.6.40/sapi/fpm/status.html.in
+--- php-5.6.40.org/sapi/fpm/status.html.in	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/sapi/fpm/status.html.in	2021-08-23 23:19:51.305766688 +0200
 @@ -96,7 +96,7 @@
  			var sort_index;
  			var sort_order;
@@ -82,16 +98,3 @@
  
  			ths = document.getElementsByTagName("th");
  			for (var i=0; i<ths.length; i++) {
---- php-5.6.2/sapi/fpm/Makefile.frag~	2014-10-27 08:18:59.000000000 +0200
-+++ php-5.6.2/sapi/fpm/Makefile.frag	2014-10-27 08:19:37.524436179 +0200
-@@ -12,8 +12,8 @@
- 
- 	@echo "Installing PHP FPM config:        $(INSTALL_ROOT)$(sysconfdir)/" && \
- 	$(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/fpm.d || :
--	@$(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf.default || :
--	@$(INSTALL_DATA) sapi/fpm/php-fpm.conf-d $(INSTALL_ROOT)$(sysconfdir)/fpm.d/www.conf.default || :
-+	@$(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf || :
-+	@$(INSTALL_DATA) sapi/fpm/php-fpm.conf-d $(INSTALL_ROOT)$(sysconfdir)/fpm.d/www.conf || :
- 
- 	@echo "Installing PHP FPM man page:      $(INSTALL_ROOT)$(mandir)/man8/"
- 	@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man8
diff --git a/php-icu64.patch b/php-icu64.patch
index c5154fa..e9b7efa 100644
--- a/php-icu64.patch
+++ b/php-icu64.patch
@@ -1,6 +1,7 @@
---- php-5.5.38.orig/ext/intl/breakiterator/breakiterator_class.cpp	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/breakiterator/breakiterator_class.cpp	2019-04-18 09:26:37.409910360 +0200
-@@ -38,6 +38,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/breakiterator/breakiterator_class.cpp php-5.6.40/ext/intl/breakiterator/breakiterator_class.cpp
+--- php-5.6.40.org/ext/intl/breakiterator/breakiterator_class.cpp	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/breakiterator/breakiterator_class.cpp	2021-08-23 23:20:40.309048531 +0200
+@@ -38,6 +38,7 @@ extern "C" {
  }
  
  using PHP::CodePointBreakIterator;
@@ -8,8 +9,9 @@
  
  /* {{{ Global variables */
  zend_class_entry *BreakIterator_ce_ptr;
---- php-5.5.38.orig/ext/intl/breakiterator/breakiterator_class.h	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/breakiterator/breakiterator_class.h	2019-04-18 09:27:25.925787455 +0200
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/breakiterator/breakiterator_class.h php-5.6.40/ext/intl/breakiterator/breakiterator_class.h
+--- php-5.6.40.org/ext/intl/breakiterator/breakiterator_class.h	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/breakiterator/breakiterator_class.h	2021-08-23 23:20:40.309048531 +0200
 @@ -26,6 +26,8 @@
  
  #ifndef USE_BREAKITERATOR_POINTER
@@ -19,9 +21,10 @@
  #endif
  
  typedef struct {
---- php-5.5.38.orig/ext/intl/breakiterator/breakiterator_methods.cpp	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/breakiterator/breakiterator_methods.cpp	2019-04-18 09:30:32.998928523 +0200
-@@ -32,6 +32,8 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/breakiterator/breakiterator_methods.cpp php-5.6.40/ext/intl/breakiterator/breakiterator_methods.cpp
+--- php-5.6.40.org/ext/intl/breakiterator/breakiterator_methods.cpp	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/breakiterator/breakiterator_methods.cpp	2021-08-23 23:20:40.309048531 +0200
+@@ -32,6 +32,8 @@ extern "C" {
  }
  
  using PHP::CodePointBreakIterator;
@@ -30,9 +33,10 @@
  
  U_CFUNC PHP_METHOD(BreakIterator, __construct)
  {
---- php-5.5.38.orig/ext/intl/breakiterator/codepointiterator_internal.cpp	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/breakiterator/codepointiterator_internal.cpp	2019-04-18 09:24:40.240427586 +0200
-@@ -30,6 +30,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/breakiterator/codepointiterator_internal.cpp php-5.6.40/ext/intl/breakiterator/codepointiterator_internal.cpp
+--- php-5.6.40.org/ext/intl/breakiterator/codepointiterator_internal.cpp	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/breakiterator/codepointiterator_internal.cpp	2021-08-23 23:20:40.309048531 +0200
+@@ -30,6 +30,7 @@ typedef union {
  #define U_ALIGNMENT_OFFSET_UP(ptr) (sizeof(UAlignedMemory) - U_ALIGNMENT_OFFSET(ptr))
  
  using namespace PHP;
@@ -40,8 +44,9 @@
  
  UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CodePointBreakIterator);
  
---- php-5.5.38.orig/ext/intl/breakiterator/codepointiterator_internal.h	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/breakiterator/codepointiterator_internal.h	2019-04-18 09:25:57.127796222 +0200
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/breakiterator/codepointiterator_internal.h php-5.6.40/ext/intl/breakiterator/codepointiterator_internal.h
+--- php-5.6.40.org/ext/intl/breakiterator/codepointiterator_internal.h	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/breakiterator/codepointiterator_internal.h	2021-08-23 23:20:40.312381861 +0200
 @@ -18,8 +18,11 @@
  #define CODEPOINTITERATOR_INTERNAL_H
  
@@ -55,11 +60,12 @@
  
  namespace PHP {
  
---- php-5.5.38.orig/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp	2019-04-18 09:30:55.920130219 +0200
-@@ -25,6 +25,9 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp php-5.6.40/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
+--- php-5.6.40.org/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp	2021-08-23 23:20:40.312381861 +0200
+@@ -25,6 +25,9 @@ extern "C" {
  
- #include "../ext/intl_convertcpp.h"
+ #include "../intl_convertcpp.h"
  
 +using icu::RuleBasedBreakIterator;
 +using icu::Locale;
@@ -67,9 +73,10 @@
  static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) {
  	return (RuleBasedBreakIterator*)bio->biter;
  }
---- php-5.5.38.orig/ext/intl/calendar/calendar_class.cpp	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/calendar/calendar_class.cpp	2019-04-18 09:21:08.825998526 +0200
-@@ -34,6 +34,9 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/calendar/calendar_class.cpp php-5.6.40/ext/intl/calendar/calendar_class.cpp
+--- php-5.6.40.org/ext/intl/calendar/calendar_class.cpp	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/calendar/calendar_class.cpp	2021-08-23 23:20:40.312381861 +0200
+@@ -34,6 +34,9 @@ extern "C" {
  #include <assert.h>
  }
  
@@ -79,8 +86,9 @@
  /* {{{ Global variables */
  zend_class_entry *Calendar_ce_ptr;
  zend_class_entry *GregorianCalendar_ce_ptr;
---- php-5.5.38.orig/ext/intl/calendar/calendar_class.h	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/calendar/calendar_class.h	2019-04-18 08:51:22.553104240 +0200
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/calendar/calendar_class.h php-5.6.40/ext/intl/calendar/calendar_class.h
+--- php-5.6.40.org/ext/intl/calendar/calendar_class.h	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/calendar/calendar_class.h	2021-08-23 23:20:40.312381861 +0200
 @@ -26,6 +26,8 @@
  
  #ifndef USE_CALENDAR_POINTER
@@ -90,9 +98,10 @@
  #endif
  
  typedef struct {
---- php-5.5.38.orig/ext/intl/calendar/calendar_methods.cpp	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/calendar/calendar_methods.cpp	2019-04-18 09:21:37.634177141 +0200
-@@ -40,6 +40,8 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/calendar/calendar_methods.cpp php-5.6.40/ext/intl/calendar/calendar_methods.cpp
+--- php-5.6.40.org/ext/intl/calendar/calendar_methods.cpp	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/calendar/calendar_methods.cpp	2021-08-23 23:20:40.312381861 +0200
+@@ -40,6 +40,8 @@ extern "C" {
  }
  #include "../common/common_enum.h"
  
@@ -101,9 +110,10 @@
  U_CFUNC PHP_METHOD(IntlCalendar, __construct)
  {
  	zend_throw_exception( NULL,
---- php-5.5.38.orig/ext/intl/calendar/gregoriancalendar_methods.cpp	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/calendar/gregoriancalendar_methods.cpp	2019-04-18 09:23:00.341851246 +0200
-@@ -32,6 +32,11 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/calendar/gregoriancalendar_methods.cpp php-5.6.40/ext/intl/calendar/gregoriancalendar_methods.cpp
+--- php-5.6.40.org/ext/intl/calendar/gregoriancalendar_methods.cpp	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/calendar/gregoriancalendar_methods.cpp	2021-08-23 23:20:40.312381861 +0200
+@@ -32,6 +32,11 @@ extern "C" {
  #include <ext/date/php_date.h>
  }
  
@@ -115,10 +125,11 @@
  static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
  	return (GregorianCalendar*)co->ucal;
  }
---- php-5.5.38.orig/ext/intl/common/common_date.cpp	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/common/common_date.cpp	2019-04-18 08:53:40.357013115 +0200
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/common/common_date.cpp php-5.6.40/ext/intl/common/common_date.cpp
+--- php-5.6.40.org/ext/intl/common/common_date.cpp	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/common/common_date.cpp	2021-08-23 23:20:40.312381861 +0200
 @@ -17,6 +17,8 @@
- #include "../ext/intl_cppshims.h"
+ #include "../intl_cppshims.h"
  
  #include <unicode/calendar.h>
 +using icu::TimeZone;
@@ -126,9 +137,10 @@
  
  extern "C" {
  #include "../php_intl.h"
---- php-5.5.38.orig/ext/intl/common/common_date.h	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/common/common_date.h	2019-04-18 09:04:53.802375635 +0200
-@@ -27,6 +27,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/common/common_date.h php-5.6.40/ext/intl/common/common_date.h
+--- php-5.6.40.org/ext/intl/common/common_date.h	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/common/common_date.h	2021-08-23 23:20:40.312381861 +0200
+@@ -27,6 +27,7 @@ U_CDECL_END
  #ifdef __cplusplus
  
  #include <unicode/timezone.h>
@@ -136,9 +148,10 @@
  
  U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, int is_datetime, intl_error *outside_error, const char *func TSRMLS_DC);
  U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
---- php-5.5.38.orig/ext/intl/common/common_enum.h	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/common/common_enum.h	2019-04-18 08:50:49.214683321 +0200
-@@ -69,6 +69,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/common/common_enum.h php-5.6.40/ext/intl/common/common_enum.h
+--- php-5.6.40.org/ext/intl/common/common_enum.h	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/common/common_enum.h	2021-08-23 23:20:40.312381861 +0200
+@@ -69,6 +69,7 @@ U_CFUNC void zoi_with_current_get_curren
  U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter TSRMLS_DC);
  
  #ifdef __cplusplus
@@ -146,9 +159,10 @@
  U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object TSRMLS_DC);
  #endif
  
---- php-5.5.38.orig/ext/intl/dateformat/dateformat_format_object.cpp	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/dateformat/dateformat_format_object.cpp	2019-04-18 08:55:34.509673920 +0200
-@@ -33,6 +33,12 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/dateformat/dateformat_format_object.cpp php-5.6.40/ext/intl/dateformat/dateformat_format_object.cpp
+--- php-5.6.40.org/ext/intl/dateformat/dateformat_format_object.cpp	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/dateformat/dateformat_format_object.cpp	2021-08-23 23:20:40.312381861 +0200
+@@ -33,6 +33,12 @@ extern "C" {
  #include "../common/common_date.h"
  }
  
@@ -161,15 +175,27 @@
  static const DateFormat::EStyle valid_styles[] = {
  		DateFormat::kNone,
  		DateFormat::kFull,
---- php-5.5.38.orig/ext/intl/dateformat/dateformat_helpers.h	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/dateformat/dateformat_helpers.h	2019-04-18 09:07:05.049267391 +0200
-@@ -22,11 +22,18 @@
- #endif
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/dateformat/dateformat_helpers.cpp php-5.6.40/ext/intl/dateformat/dateformat_helpers.cpp
+--- php-5.6.40.org/ext/intl/dateformat/dateformat_helpers.cpp	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/dateformat/dateformat_helpers.cpp	2021-08-23 23:20:40.312381861 +0200
+@@ -28,6 +28,8 @@ extern "C" {
+ #include "../calendar/calendar_class.h"
+ }
  
- #include <unicode/calendar.h>
++using icu::GregorianCalendar;
 +
-+#include <unicode/datefmt.h>
+ int datefmt_process_calendar_arg(zval* calendar_zv,
+ 								 Locale const& locale,
+ 								 const char *func_name,
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/dateformat/dateformat_helpers.h php-5.6.40/ext/intl/dateformat/dateformat_helpers.h
+--- php-5.6.40.org/ext/intl/dateformat/dateformat_helpers.h	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/dateformat/dateformat_helpers.h	2021-08-23 23:20:40.312381861 +0200
+@@ -23,10 +23,17 @@
+ 
+ #include <unicode/calendar.h>
  
++#include <unicode/datefmt.h>
++
  extern "C" {
  #include "../php_intl.h"
  }
@@ -182,8 +208,9 @@
  int datefmt_process_calendar_arg(zval* calendar_zv,
  								 Locale const& locale,
  								 const char *func_name,
---- php-5.5.38.orig/ext/intl/intl_convertcpp.h	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/intl_convertcpp.h	2019-04-18 08:49:50.358252987 +0200
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/intl_convertcpp.h php-5.6.40/ext/intl/intl_convertcpp.h
+--- php-5.6.40.org/ext/intl/intl_convertcpp.h	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/intl_convertcpp.h	2021-08-23 23:20:40.312381861 +0200
 @@ -24,6 +24,7 @@
  #endif
  
@@ -192,8 +219,9 @@
  
  int intl_stringFromChar(UnicodeString &ret, char *str, int32_t str_len, UErrorCode *status);
  
---- php-5.5.38.orig/ext/intl/msgformat/msgformat_helpers.cpp	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/msgformat/msgformat_helpers.cpp	2019-04-18 09:00:43.482564710 +0200
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/msgformat/msgformat_helpers.cpp php-5.6.40/ext/intl/msgformat/msgformat_helpers.cpp
+--- php-5.6.40.org/ext/intl/msgformat/msgformat_helpers.cpp	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/msgformat/msgformat_helpers.cpp	2021-08-23 23:20:40.312381861 +0200
 @@ -27,6 +27,7 @@
  #include <unicode/timezone.h>
  #include <unicode/datefmt.h>
@@ -202,7 +230,7 @@
  
  #include <vector>
  
-@@ -76,6 +77,16 @@
+@@ -76,6 +77,16 @@ MessageFormatAdapter::getMessagePattern(
  #endif
  U_NAMESPACE_END
  
@@ -219,9 +247,10 @@
  U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt)
  {
  	int32_t fmt_count = 0;
---- php-5.5.38.orig/ext/intl/timezone/timezone_class.cpp	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/timezone/timezone_class.cpp	2019-04-18 09:01:40.738904566 +0200
-@@ -37,6 +37,8 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/timezone/timezone_class.cpp php-5.6.40/ext/intl/timezone/timezone_class.cpp
+--- php-5.6.40.org/ext/intl/timezone/timezone_class.cpp	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/timezone/timezone_class.cpp	2021-08-23 23:20:40.312381861 +0200
+@@ -37,6 +37,8 @@ extern "C" {
  #include <ext/date/php_date.h>
  }
  
@@ -230,8 +259,9 @@
  /* {{{ Global variables */
  U_CDECL_BEGIN
  zend_class_entry *TimeZone_ce_ptr = NULL;
---- php-5.5.38.orig/ext/intl/timezone/timezone_class.h	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/timezone/timezone_class.h	2019-04-18 08:58:02.620784547 +0200
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/timezone/timezone_class.h php-5.6.40/ext/intl/timezone/timezone_class.h
+--- php-5.6.40.org/ext/intl/timezone/timezone_class.h	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/timezone/timezone_class.h	2021-08-23 23:20:40.312381861 +0200
 @@ -29,6 +29,8 @@
  
  #ifndef USE_TIMEZONE_POINTER
@@ -241,8 +271,9 @@
  #endif
  
  typedef struct {
---- php-5.5.38.orig/ext/intl/timezone/timezone_methods.cpp	2016-07-20 10:41:48.000000000 +0200
-+++ php-5.5.38/ext/intl/timezone/timezone_methods.cpp	2019-04-18 09:20:17.116617981 +0200
+diff -urNp -x '*.orig' php-5.6.40.org/ext/intl/timezone/timezone_methods.cpp php-5.6.40/ext/intl/timezone/timezone_methods.cpp
+--- php-5.6.40.org/ext/intl/timezone/timezone_methods.cpp	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/intl/timezone/timezone_methods.cpp	2021-08-23 23:20:40.312381861 +0200
 @@ -23,6 +23,7 @@
  #include <unicode/locid.h>
  #include <unicode/timezone.h>
@@ -251,7 +282,7 @@
  #include "intl_convertcpp.h"
  
  #include "../common/common_date.h"
-@@ -37,6 +38,9 @@
+@@ -37,6 +38,9 @@ extern "C" {
  }
  #include "common/common_enum.h"
  
@@ -261,15 +292,3 @@
  U_CFUNC PHP_METHOD(IntlTimeZone, __construct)
  {
  	zend_throw_exception( NULL,
-
---- php-7.0.33/ext/intl/dateformat/dateformat_helpers.cpp~	2018-12-04 18:22:53.000000000 +0100
-+++ php-7.0.33/ext/intl/dateformat/dateformat_helpers.cpp	2019-10-19 21:29:32.416045611 +0200
-@@ -28,6 +28,8 @@ extern "C" {
- #include "../calendar/calendar_class.h"
- }
- 
-+using icu::GregorianCalendar;
-+
- int datefmt_process_calendar_arg(zval* calendar_zv,
- 								 Locale const& locale,
- 								 const char *func_name,
diff --git a/php-libtool.patch b/php-libtool.patch
index f9713d8..b0a3583 100644
--- a/php-libtool.patch
+++ b/php-libtool.patch
@@ -1,6 +1,7 @@
---- php-5.4.6/scripts/phpize.in~	2012-08-23 03:02:42.000000000 +0300
-+++ php-5.4.6/scripts/phpize.in	2012-08-23 10:16:37.011306948 +0300
-@@ -6,10 +6,16 @@
+diff -urNp -x '*.orig' php-5.6.40.org/scripts/phpize.in php-5.6.40/scripts/phpize.in
+--- php-5.6.40.org/scripts/phpize.in	2021-08-23 23:19:31.559120642 +0200
++++ php-5.6.40/scripts/phpize.in	2021-08-23 23:19:32.532452961 +0200
+@@ -6,10 +6,16 @@ datarootdir='@datarootdir@'
  exec_prefix="`eval echo @exec_prefix@`"
  phpdir="`eval echo @libdir@`/php/build"
  includedir="`eval echo @includedir@`/php"
@@ -16,7 +17,7 @@
 +    LIBTOOL_FILES="libtool.m4"
 +fi
  FILES="acinclude.m4 Makefile.global config.sub config.guess ltmain.sh run-tests*.php"
- CLEAN_FILES="$FILES *.o *.lo *.la .deps .libs/ build/ include/ modules/ install-sh \
+ CLEAN_FILES="$FILES *.o *.lo *.la .deps .libs/ build/ modules/ install-sh \
  	mkinstalldirs missing config.nice config.sub config.guess configure configure.in \
 @@ -145,8 +151,9 @@ phpize_copy_files()
    test -d build || mkdir build
diff --git a/php-mail.patch b/php-mail.patch
index e541727..3a8adc9 100644
--- a/php-mail.patch
+++ b/php-mail.patch
@@ -1,16 +1,17 @@
---- 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
-@@ -35,6 +37,8 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/standard/mail.c php-5.6.40/ext/standard/mail.c
+--- php-5.6.40.org/ext/standard/mail.c	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/standard/mail.c	2021-08-23 23:18:38.625842193 +0200
+@@ -46,6 +46,8 @@
  #include "php_ini.h"
- #include "safe_mode.h"
+ #include "php_string.h"
  #include "exec.h"
 +#include "zend_operators.h"
 +#include "zend_globals.h"
  
  #ifdef PHP_WIN32
  #include "win32/sendmail.h"
-@@ -107,6 +111,18 @@
- 		return;
+@@ -124,6 +126,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 */
@@ -28,8 +29,8 @@
  	if (to_len > 0) {
  		to_r = estrndup(to, to_len);
  		for (; to_len; to_len--) {
-@@ -231,8 +247,42 @@
- 			return 0;
+@@ -395,8 +409,42 @@ PHPAPI int php_mail(char *to, char *subj
+ 			MAIL_RET(0);
  		}
  #endif
 -		fprintf(sendmail, "To: %s\n", to);
diff --git a/php-mysql-charsetphpini.patch b/php-mysql-charsetphpini.patch
index 37ff15b..eff2bae 100644
--- a/php-mysql-charsetphpini.patch
+++ b/php-mysql-charsetphpini.patch
@@ -1,22 +1,23 @@
---- php-5.5.0RC2/ext/mysql/php_mysql.c~	2013-06-11 22:12:11.000000000 +0300
-+++ php-5.5.0RC2/ext/mysql/php_mysql.c	2013-06-11 22:16:04.192270533 +0300
-@@ -360,6 +360,7 @@
- 	PHP_INI_ENTRY("mysql.default_port",				NULL,	PHP_INI_ALL,		OnMySQLPort)
+diff -urNp -x '*.orig' php-5.6.40.org/ext/mysql/php_mysql.c php-5.6.40/ext/mysql/php_mysql.c
+--- php-5.6.40.org/ext/mysql/php_mysql.c	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/mysql/php_mysql.c	2021-08-23 23:19:37.539114406 +0200
+@@ -506,6 +506,7 @@ PHP_INI_BEGIN()
  	STD_PHP_INI_ENTRY("mysql.default_socket",		NULL,	PHP_INI_ALL,		OnUpdateStringUnempty,	default_socket,	zend_mysql_globals,		mysql_globals)
+ #endif
  	STD_PHP_INI_ENTRY("mysql.connect_timeout",		"60",	PHP_INI_ALL,		OnUpdateLong,		connect_timeout, 	zend_mysql_globals,		mysql_globals)
 +	STD_PHP_INI_ENTRY("mysql.connect_charset",		NULL,	PHP_INI_ALL,		OnUpdateString,		connect_charset,	zend_mysql_globals,		mysql_globals)
  	STD_PHP_INI_BOOLEAN("mysql.trace_mode",			"0",	PHP_INI_ALL,		OnUpdateLong,		trace_mode, 		zend_mysql_globals,		mysql_globals)
+ 	STD_PHP_INI_BOOLEAN("mysql.allow_local_infile",	"1",	PHP_INI_SYSTEM,		OnUpdateLong,		allow_local_infile, zend_mysql_globals,		mysql_globals)
  PHP_INI_END()
- /* }}} */
-@@ -376,6 +377,7 @@
+@@ -523,6 +524,7 @@ static PHP_GINIT_FUNCTION(mysql)
  	mysql_globals->connect_errno = 0;
  	mysql_globals->connect_error = NULL;
  	mysql_globals->connect_timeout = 0;
 +	mysql_globals->connect_charset = NULL;
  	mysql_globals->trace_mode = 0;
+ 	mysql_globals->allow_local_infile = 1;
  	mysql_globals->result_allocated = 0;
- }
-@@ -723,6 +723,7 @@
+@@ -721,6 +723,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 = 0, passwd_len = 0, host_len = 0;
@@ -24,17 +25,15 @@
  	char *hashed_details=NULL;
  	int hashed_details_length, port = MYSQL_PORT;
  	long client_flags = 0;
-@@ -527,6 +530,7 @@
- 
+@@ -744,6 +747,7 @@ static void php_mysql_do_connect(INTERNA
+ #endif
  
  	connect_timeout = MySG(connect_timeout);
 +	connect_charset = MySG(connect_charset);
  
  	socket = MySG(default_socket);
  
---- php-5.3.1/ext/mysql/php_mysql.c~	2010-02-20 00:51:52.000000000 +0200
-+++ php-5.3.1/ext/mysql/php_mysql.c	2010-02-20 00:55:43.475653264 +0200
-@@ -777,6 +777,10 @@
+@@ -885,6 +889,10 @@ static void php_mysql_do_connect(INTERNA
  			if (connect_timeout != -1) {
  				mysql_options(mysql->conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout);
  			}
@@ -45,8 +44,8 @@
  #ifndef MYSQL_USE_MYSQLND
  			if (mysql_real_connect(mysql->conn, host, user, passwd, NULL, port, socket, client_flags)==NULL)
  #else
-@@ -826,6 +830,8 @@
- #endif	
+@@ -933,6 +941,8 @@ static void php_mysql_do_connect(INTERNA
+ #endif
  			if (mysql_ping(mysql->conn)) {
  				if (mysql_errno(mysql->conn) == 2006) {
 +					if (connect_charset != NULL)
@@ -54,19 +53,20 @@
  #ifndef MYSQL_USE_MYSQLND
  					if (mysql_real_connect(mysql->conn, host, user, passwd, NULL, port, socket, client_flags)==NULL)
  #else
-@@ -898,6 +904,9 @@
- 		if (connect_timeout != -1)
- 				mysql_options(mysql->conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout);
+@@ -1012,6 +1022,9 @@ static void php_mysql_do_connect(INTERNA
+ 			mysql_options(mysql->conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout);
+ 		}
  
 +		if (connect_charset != NULL)
 +			mysql_options(mysql->conn, MYSQL_SET_CHARSET_NAME, connect_charset);
 +
  #ifndef MYSQL_USE_MYSQLND
- 		if (mysql_real_connect(mysql->conn, host, user, passwd, NULL, port, socket, client_flags)==NULL) 
+ 		if (mysql_real_connect(mysql->conn, host, user, passwd, NULL, port, socket, client_flags)==NULL)
  #else
---- 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.6.40.org/ext/mysql/php_mysql_structs.h php-5.6.40/ext/mysql/php_mysql_structs.h
+--- php-5.6.40.org/ext/mysql/php_mysql_structs.h	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/mysql/php_mysql_structs.h	2021-08-23 23:19:37.539114406 +0200
+@@ -118,6 +118,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 895a1a7..e0bae27 100644
--- a/php-mysqli-charsetphpini.patch
+++ b/php-mysqli-charsetphpini.patch
@@ -1,14 +1,15 @@
---- php-5.3.1/ext/mysqli/mysqli.c~	2010-02-20 00:58:34.000000000 +0200
-+++ php-5.3.1/ext/mysqli/mysqli.c	2010-02-20 01:00:22.459111311 +0200
-@@ -602,6 +602,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/mysqli/mysqli.c php-5.6.40/ext/mysqli/mysqli.c
+--- php-5.6.40.org/ext/mysqli/mysqli.c	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/mysqli/mysqli.c	2021-08-23 23:19:40.372444781 +0200
+@@ -571,6 +571,7 @@ PHP_INI_BEGIN()
  #else
  	STD_PHP_INI_ENTRY("mysqli.default_socket",			NULL,	PHP_INI_ALL,		OnUpdateStringUnempty,	default_socket,	zend_mysqli_globals,		mysqli_globals)
  #endif
 +	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)
  	STD_PHP_INI_BOOLEAN("mysqli.allow_local_infile",	"1",	PHP_INI_SYSTEM,		OnUpdateLong,		allow_local_infile,	zend_mysqli_globals,		mysqli_globals)
- #ifdef MYSQLI_USE_MYSQLND
-@@ -475,6 +476,7 @@
+ PHP_INI_END()
+@@ -592,6 +593,7 @@ static PHP_GINIT_FUNCTION(mysqli)
  	mysqli_globals->default_user = NULL;
  	mysqli_globals->default_pw = NULL;
  	mysqli_globals->default_socket = NULL;
@@ -16,9 +17,10 @@
  	mysqli_globals->reconnect = 0;
  	mysqli_globals->report_mode = 0;
  	mysqli_globals->report_ht = 0;
---- php-5.3.4/ext/mysqli/mysqli_nonapi.c~	2010-12-12 23:07:03.000000000 +0200
-+++ php-5.3.4/ext/mysqli/mysqli_nonapi.c	2010-12-12 23:07:36.497424912 +0200
-@@ -61,7 +61,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/mysqli/mysqli_nonapi.c php-5.6.40/ext/mysqli/mysqli_nonapi.c
+--- php-5.6.40.org/ext/mysqli/mysqli_nonapi.c	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/mysqli/mysqli_nonapi.c	2021-08-23 23:19:40.372444781 +0200
+@@ -62,7 +62,7 @@ void mysqli_common_connect(INTERNAL_FUNC
  	MY_MYSQL			*mysql = NULL;
  	MYSQLI_RESOURCE		*mysqli_resource = NULL;
  	zval				*object = getThis();
@@ -27,7 +29,7 @@
  	int					hostname_len = 0, username_len = 0, passwd_len = 0, dbname_len = 0, socket_len = 0;
  	zend_bool			persistent = FALSE;
  	long				port = 0, flags = 0;
-@@ -241,6 +241,12 @@
+@@ -235,6 +235,12 @@ void mysqli_common_connect(INTERNAL_FUNC
  	}
  #endif
  
@@ -38,11 +40,12 @@
 +	}
 +
  #if !defined(MYSQLI_USE_MYSQLND)
- 	if (mysql_real_connect(mysql->mysql, hostname, username, passwd, dbname, port, socket, CLIENT_MULTI_RESULTS) == NULL)
- #else
---- php-5.3.1/ext/mysqli/php_mysqli_structs.h~	2009-10-14 16:51:25.000000000 +0300
-+++ php-5.3.1/ext/mysqli/php_mysqli_structs.h	2010-02-20 01:04:56.512214846 +0200
-@@ -358,6 +358,7 @@
+ 	/* BC for prior to bug fix #53425 */
+ 	flags |= CLIENT_MULTI_RESULTS;
+diff -urNp -x '*.orig' php-5.6.40.org/ext/mysqli/php_mysqli_structs.h php-5.6.40/ext/mysqli/php_mysqli_structs.h
+--- php-5.6.40.org/ext/mysqli/php_mysqli_structs.h	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/mysqli/php_mysqli_structs.h	2021-08-23 23:19:40.372444781 +0200
+@@ -329,6 +329,7 @@ ZEND_BEGIN_MODULE_GLOBALS(mysqli)
  	char			*default_user;
  	char			*default_socket;
  	char			*default_pw;
diff --git a/php-pdo_mysql-charsetphpini.patch b/php-pdo_mysql-charsetphpini.patch
index 36a7c95..a86ebca 100644
--- a/php-pdo_mysql-charsetphpini.patch
+++ b/php-pdo_mysql-charsetphpini.patch
@@ -3,9 +3,10 @@ understand what this patch is supposed to do as in 5.3 the ini section is
 enabled only if mysqlnd driver is enabled which makes the contexts really
 small.
 
---- php-5.3.1/ext/pdo_mysql/mysql_driver.c~	2010-02-20 01:08:04.000000000 +0200
-+++ php-5.3.1/ext/pdo_mysql/mysql_driver.c	2010-02-20 01:08:52.982186037 +0200
-@@ -436,6 +436,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/pdo_mysql/mysql_driver.c php-5.6.40/ext/pdo_mysql/mysql_driver.c
+--- php-5.6.40.org/ext/pdo_mysql/mysql_driver.c	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/pdo_mysql/mysql_driver.c	2021-08-23 23:19:43.115775250 +0200
+@@ -539,6 +539,7 @@ static int pdo_mysql_handle_factory(pdo_
  	pdo_mysql_db_handle *H;
  	int i, ret = 0;
  	char *host = NULL, *unix_socket = NULL;
@@ -13,7 +14,7 @@ small.
  	unsigned int port = 3306;
  	char *dbname;
  	struct pdo_data_src_parser vars[] = {
-@@ -731,6 +731,12 @@
+@@ -764,6 +765,12 @@ static int pdo_mysql_handle_factory(pdo_
  		password_len = strlen(dbh->password);
  	}
  
@@ -24,11 +25,12 @@ small.
 +	}
 +
  	if (mysqlnd_connect(H->server, host, dbh->username, dbh->password, password_len, dbname, dbname_len,
- 						port, unix_socket, connect_opts, PDO_MYSQL_G(mysqlnd_thd_zval_cache) TSRMLS_CC) == NULL) {
+ 						port, unix_socket, connect_opts, MYSQLND_CLIENT_NO_FLAG TSRMLS_CC) == NULL) {
  #else
---- php-5.3.3/ext/pdo_mysql/pdo_mysql.c~	2010-07-24 19:23:14.000000000 +0300
-+++ php-5.3.3/ext/pdo_mysql/pdo_mysql.c	2010-07-24 19:24:48.363581841 +0300
-@@ -56,6 +56,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/pdo_mysql/pdo_mysql.c php-5.6.40/ext/pdo_mysql/pdo_mysql.c
+--- php-5.6.40.org/ext/pdo_mysql/pdo_mysql.c	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/pdo_mysql/pdo_mysql.c	2021-08-23 23:19:43.115775250 +0200
+@@ -95,6 +95,7 @@ PHP_INI_BEGIN()
  #if PDO_DBG_ENABLED
  	STD_PHP_INI_ENTRY("pdo_mysql.debug",	NULL, PHP_INI_SYSTEM, OnUpdateString, debug, zend_pdo_mysql_globals, pdo_mysql_globals)
  #endif
@@ -36,7 +38,7 @@ small.
  PHP_INI_END()
  /* }}} */
  
-@@ -89,9 +90,7 @@
+@@ -141,9 +142,7 @@ static PHP_MINIT_FUNCTION(pdo_mysql)
  static PHP_MSHUTDOWN_FUNCTION(pdo_mysql)
  {
  	php_pdo_unregister_driver(&pdo_mysql_driver);
@@ -46,7 +48,7 @@ small.
  
  	return SUCCESS;
  }
-@@ -161,6 +161,7 @@
+@@ -213,6 +212,7 @@ static PHP_GINIT_FUNCTION(pdo_mysql)
  	pdo_mysql_globals->debug = NULL;	/* The actual string */
  	pdo_mysql_globals->dbg = NULL;	/* The DBG object*/
  #endif
@@ -54,9 +56,10 @@ small.
  }
  /* }}} */
  
---- php-5.3.2RC3/ext/pdo_mysql/php_pdo_mysql_int.h~	2010-02-04 11:37:38.000000000 +0200
-+++ php-5.3.2RC3/ext/pdo_mysql/php_pdo_mysql_int.h	2010-02-26 19:11:47.484055898 +0200
-@@ -69,6 +69,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/pdo_mysql/php_pdo_mysql_int.h php-5.6.40/ext/pdo_mysql/php_pdo_mysql_int.h
+--- php-5.6.40.org/ext/pdo_mysql/php_pdo_mysql_int.h	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/pdo_mysql/php_pdo_mysql_int.h	2021-08-23 23:19:43.115775250 +0200
+@@ -72,6 +72,7 @@ ZEND_BEGIN_MODULE_GLOBALS(pdo_mysql)
  	char          *debug; /* The actual string */
  	MYSQLND_DEBUG *dbg;	/* The DBG object */
  #endif
diff --git a/php-pear.patch b/php-pear.patch
index 400359d..08617c4 100644
--- a/php-pear.patch
+++ b/php-pear.patch
@@ -1,6 +1,7 @@
---- php-5.3.1/configure.in~	2010-02-19 23:26:13.000000000 +0200
-+++ php-5.3.1/configure.in	2010-02-19 23:27:58.273207305 +0200
-@@ -934,11 +934,6 @@
+diff -urNp -x '*.orig' php-5.6.40.org/configure.in php-5.6.40/configure.in
+--- php-5.6.40.org/configure.in	2021-08-23 23:19:20.735798578 +0200
++++ php-5.6.40/configure.in	2021-08-23 23:19:21.769130837 +0200
+@@ -1078,11 +1078,6 @@ if test -z "$with_pear" && test "$enable
    with_pear=no
  fi
  
@@ -10,9 +11,9 @@
 -fi
 -
  PHP_ARG_WITH(pear, [whether to install PEAR],
- [  --with-pear=DIR         Install PEAR in DIR [PREFIX/lib/php]
+ [  --with-pear=DIR         Install PEAR in DIR @<:@PREFIX/lib/php@:>@
    --without-pear          Do not install PEAR], DEFAULT, yes)
-@@ -1023,11 +1023,11 @@
+@@ -1092,11 +1087,11 @@ if test "$PHP_PEAR" != "no"; then
    dnl
    dnl PEAR dependancies
    dnl
@@ -29,14 +30,15 @@
  dnl
  dnl  if test "$PHP_XMLRPC" = "no"; then
  dnl    pear_error_msg="$pear_error_msg 
---- php-5.2.6/sapi/cli/config.m4~	2008-11-16 18:35:31.000000000 +0200
-+++ php-5.2.6/sapi/cli/config.m4	2008-11-20 19:04:12.585061299 +0200
-@@ -4,7 +4,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/cli/config.m4 php-5.6.40/sapi/cli/config.m4
+--- php-5.6.40.org/sapi/cli/config.m4	2021-08-23 23:19:20.735798578 +0200
++++ php-5.6.40/sapi/cli/config.m4	2021-08-23 23:19:21.769130837 +0200
+@@ -4,7 +4,7 @@ dnl
  
  PHP_ARG_ENABLE(cli,,
  [  --disable-cli           Disable building CLI version of PHP
 -                          (this forces --without-pear)], yes, no)
 +                          ], yes, no)
  
- AC_MSG_CHECKING(for CLI build)
- if test "$PHP_CLI" != "no"; then
+ AC_CHECK_FUNCS(setproctitle)
+ 
diff --git a/php-shared.patch b/php-shared.patch
index 6a0d93e..40e9c22 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 @@
- 	
- build-modules: $(PHP_MODULES)
+diff -urNp -x '*.orig' php-5.6.40.org/Makefile.global php-5.6.40/Makefile.global
+--- php-5.6.40.org/Makefile.global	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/Makefile.global	2021-08-23 23:18:33.545847429 +0200
+@@ -15,8 +15,12 @@ build-modules: $(PHP_MODULES) $(PHP_ZEND
+ 
+ build-binaries: $(PHP_BINARIES)
  
 -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 @@
+@@ -27,10 +31,10 @@ install: $(all_targets) $(install_target
  install-sapi: $(OVERALL_TARGET)
  	@echo "Installing PHP SAPI module:       $(PHP_SAPI)"
  	-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
@@ -29,9 +30,21 @@
  				break; \
  			fi; \
  		done; \
---- php-5.4.0alpha2/sapi/cgi/config9.m4~	2010-11-14 01:13:07.000000000 +0200
-+++ php-5.4.0alpha2/sapi/cgi/config9.m4	2011-08-01 10:28:47.495056372 +0300
-@@ -64,7 +64,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/cgi/Makefile.frag php-5.6.40/sapi/cgi/Makefile.frag
+--- php-5.6.40.org/sapi/cgi/Makefile.frag	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/sapi/cgi/Makefile.frag	2021-08-23 23:18:33.549180758 +0200
+@@ -1,6 +1,6 @@
+ cgi: $(SAPI_CGI_PATH)
+ 
+-$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_CGI_OBJS)
++$(SAPI_CGI_PATH): libphp_common.la $(PHP_BINARY_OBJS) $(PHP_CGI_OBJS)
+ 	$(BUILD_CGI)
+ 
+ install-cgi: $(SAPI_CGI_PATH)
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/cgi/config9.m4 php-5.6.40/sapi/cgi/config9.m4
+--- php-5.6.40.org/sapi/cgi/config9.m4	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/sapi/cgi/config9.m4	2021-08-23 23:18:33.545847429 +0200
+@@ -64,7 +64,7 @@ if test "$PHP_CGI" != "no"; then
          BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
        ;;
        *)
@@ -40,19 +53,21 @@
        ;;
      esac
  
---- php-5.4.0alpha2/sapi/cgi/Makefile.frag~	2010-11-14 01:13:07.000000000 +0200
-+++ php-5.4.0alpha2/sapi/cgi/Makefile.frag	2011-08-01 12:21:29.155180914 +0300
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/cli/Makefile.frag php-5.6.40/sapi/cli/Makefile.frag
+--- php-5.6.40.org/sapi/cli/Makefile.frag	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/sapi/cli/Makefile.frag	2021-08-23 23:18:33.549180758 +0200
 @@ -1,6 +1,6 @@
- cgi: $(SAPI_CGI_PATH)
+ cli: $(SAPI_CLI_PATH)
  
--$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_CGI_OBJS)
-+$(SAPI_CGI_PATH): libphp_common.la $(PHP_BINARY_OBJS) $(PHP_CGI_OBJS)
- 	$(BUILD_CGI)
+-$(SAPI_CLI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_CLI_OBJS)
++$(SAPI_CLI_PATH): libphp_common.la $(PHP_BINARY_OBJS) $(PHP_CLI_OBJS)
+ 	$(BUILD_CLI)
  
- install-cgi: $(SAPI_CGI_PATH)
---- php-5.4.0alpha2/sapi/cli/config.m4~	2011-06-20 23:27:39.000000000 +0300
-+++ php-5.4.0alpha2/sapi/cli/config.m4	2011-08-01 10:34:01.072624745 +0300
-@@ -31,7 +31,7 @@
+ install-cli: $(SAPI_CLI_PATH)
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/cli/config.m4 php-5.6.40/sapi/cli/config.m4
+--- php-5.6.40.org/sapi/cli/config.m4	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/sapi/cli/config.m4	2021-08-23 23:18:33.549180758 +0200
+@@ -48,7 +48,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_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -Lnetware -lphp5lib -o \$(SAPI_CLI_PATH)"
      ;;
    *)
@@ -61,19 +76,37 @@
      ;;
    esac
  
---- php-5.4.0alpha2/sapi/cli/Makefile.frag~	2011-01-24 00:40:35.000000000 +0200
-+++ php-5.4.0alpha2/sapi/cli/Makefile.frag	2011-08-01 12:22:28.627926487 +0300
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/litespeed/Makefile.frag php-5.6.40/sapi/litespeed/Makefile.frag
+--- php-5.6.40.org/sapi/litespeed/Makefile.frag	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/sapi/litespeed/Makefile.frag	2021-08-23 23:18:33.549180758 +0200
 @@ -1,6 +1,6 @@
- cli: $(SAPI_CLI_PATH)
+ litespeed: $(SAPI_LITESPEED_PATH)
  
--$(SAPI_CLI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_CLI_OBJS)
-+$(SAPI_CLI_PATH): libphp_common.la $(PHP_BINARY_OBJS) $(PHP_CLI_OBJS)
- 	$(BUILD_CLI)
+-$(SAPI_LITESPEED_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_LITESPEED_OBJS)
++$(SAPI_LITESPEED_PATH): libphp_common.la $(PHP_BINARY_OBJS) $(PHP_LITESPEED_OBJS)
+ 	$(BUILD_LITESPEED)
  
- install-cli: $(SAPI_CLI_PATH)
---- php-7.0.0RC3/sapi/phpdbg/Makefile.frag~	2015-09-16 15:49:38.000000000 +0300
-+++ php-7.0.0RC3/sapi/phpdbg/Makefile.frag	2015-09-27 21:24:44.370536565 +0300
-@@ -2,10 +2,10 @@
+ install-litespeed: $(SAPI_LITESPEED_PATH)
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/litespeed/config.m4 php-5.6.40/sapi/litespeed/config.m4
+--- php-5.6.40.org/sapi/litespeed/config.m4	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/sapi/litespeed/config.m4	2021-08-23 23:18:33.549180758 +0200
+@@ -17,10 +17,10 @@ if test "$PHP_LITESPEED" != "no"; then
+     ;;
+   *cygwin*)
+     SAPI_LITESPEED_PATH=sapi/litespeed/php.exe
+-    BUILD_LITESPEED="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_LITESPEED_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_LITESPEED_PATH)"
++    BUILD_LITESPEED="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) libphp_common.la \$(PHP_BINARY_OBJS) \$(PHP_LITESPEED_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_LITESPEED_PATH)"
+     ;;
+   *)
+-    BUILD_LITESPEED="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_LITESPEED_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_LITESPEED_PATH)"
++    BUILD_LITESPEED="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) libphp_common.la \$(PHP_BINARY_OBJS) \$(PHP_LITESPEED_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_LITESPEED_PATH)"
+     ;;
+   esac
+ 
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/phpdbg/Makefile.frag php-5.6.40/sapi/phpdbg/Makefile.frag
+--- php-5.6.40.org/sapi/phpdbg/Makefile.frag	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/sapi/phpdbg/Makefile.frag	2021-08-23 23:18:33.549180758 +0200
+@@ -2,10 +2,10 @@ phpdbg: $(BUILD_BINARY)
  
  phpdbg-shared: $(BUILD_SHARED)
  
@@ -86,9 +119,10 @@
  	$(BUILD_PHPDBG)
  
  %.c: %.y
---- php-7.0.0RC3/sapi/phpdbg/config.m4~	2015-09-16 15:49:38.000000000 +0300
-+++ php-7.0.0RC3/sapi/phpdbg/config.m4	2015-09-27 21:25:34.413134698 +0300
-@@ -40,7 +40,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/sapi/phpdbg/config.m4 php-5.6.40/sapi/phpdbg/config.m4
+--- php-5.6.40.org/sapi/phpdbg/config.m4	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/sapi/phpdbg/config.m4	2021-08-23 23:18:33.549180758 +0200
+@@ -37,7 +37,7 @@ if test "$PHP_PHPDBG" != "no"; then
    
    BUILD_PHPDBG="\$(LIBTOOL) --mode=link \
          \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \
@@ -97,7 +131,7 @@
                  \$(PHP_BINARY_OBJS) \
                  \$(PHP_PHPDBG_OBJS) \
                  \$(EXTRA_LIBS) \
-@@ -50,7 +50,7 @@
+@@ -47,7 +47,7 @@ if test "$PHP_PHPDBG" != "no"; then
  
    BUILD_PHPDBG_SHARED="\$(LIBTOOL) --mode=link \
          \$(CC) -shared -Wl,-soname,libphpdbg.so -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \
@@ -106,28 +140,3 @@
                  \$(PHP_BINARY_OBJS) \
                  \$(PHP_PHPDBG_OBJS) \
                  \$(EXTRA_LIBS) \
---- php-7.0.0RC3/sapi/litespeed/Makefile.frag~	2015-09-16 15:49:38.000000000 +0300
-+++ php-7.0.0RC3/sapi/litespeed/Makefile.frag	2015-09-27 21:26:36.783039512 +0300
-@@ -1,6 +1,6 @@
- litespeed: $(SAPI_LITESPEED_PATH)
- 
--$(SAPI_LITESPEED_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_LITESPEED_OBJS)
-+$(SAPI_LITESPEED_PATH): libphp_common.la $(PHP_BINARY_OBJS) $(PHP_LITESPEED_OBJS)
- 	$(BUILD_LITESPEED)
- 
- install-litespeed: $(SAPI_LITESPEED_PATH)
---- php-7.0.0RC3/sapi/litespeed/config.m4~	2015-09-16 15:49:38.000000000 +0300
-+++ php-7.0.0RC3/sapi/litespeed/config.m4	2015-09-27 21:27:36.182790123 +0300
-@@ -17,10 +17,10 @@
-     ;;
-   *cygwin*)
-     SAPI_LITESPEED_PATH=sapi/litespeed/php.exe
--    BUILD_LITESPEED="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_LITESPEED_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_LITESPEED_PATH)"
-+    BUILD_LITESPEED="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) libphp_common.la \$(PHP_BINARY_OBJS) \$(PHP_LITESPEED_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_LITESPEED_PATH)"
-     ;;
-   *)
--    BUILD_LITESPEED="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_LITESPEED_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_LITESPEED_PATH)"
-+    BUILD_LITESPEED="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) libphp_common.la \$(PHP_BINARY_OBJS) \$(PHP_LITESPEED_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_LITESPEED_PATH)"
-     ;;
-   esac
- 
diff --git a/php-tds.patch b/php-tds.patch
index ef036a7..cdf3a7a 100644
--- a/php-tds.patch
+++ b/php-tds.patch
@@ -1,11 +1,12 @@
---- php-5.3.3/ext/sybase_ct/config.m4~	2010-07-07 13:15:24.000000000 +0300
-+++ php-5.3.3/ext/sybase_ct/config.m4	2010-07-24 19:21:13.897144810 +0300
-@@ -31,7 +31,7 @@
-   fi
-   
+diff -urNp -x '*.orig' php-5.6.40.org/ext/sybase_ct/config.m4 php-5.6.40/ext/sybase_ct/config.m4
+--- php-5.6.40.org/ext/sybase_ct/config.m4	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/sybase_ct/config.m4	2021-08-23 23:19:35.112450270 +0200
+@@ -50,7 +50,7 @@ if test "$PHP_SYBASE_CT" != "no"; then
+   AC_MSG_CHECKING([Checking for Sybase platform libraries])
+ 
    PHP_ADD_LIBPATH($SYBASE_CT_LIBDIR, SYBASE_CT_SHARED_LIBADD)
 -  if test -f $SYBASE_CT_INCDIR/tds.h || test -f $SYBASE_CT_INCDIR/tds_sysdep_public.h; then
 +  if test -f $SYBASE_CT_INCDIR/tds.h || test -f $SYBASE_CT_INCDIR/tds_sysdep_public.h || test -f $SYBASE_CT_INCDIR/sybdb.h; then
      PHP_ADD_LIBRARY(ct,, SYBASE_CT_SHARED_LIBADD)
      SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lct"
-   elif test -f $SYBASE_CT_INCDIR/libsybct64; then
+     AC_MSG_RESULT([FreeTDS: $SYBASE_CT_LIBS])
diff --git a/php-zlib-for-getimagesize.patch b/php-zlib-for-getimagesize.patch
index 9a2bc9d..962a48d 100644
--- a/php-zlib-for-getimagesize.patch
+++ b/php-zlib-for-getimagesize.patch
@@ -2,18 +2,19 @@ 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
-@@ -31,7 +31,7 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/standard/image.c php-5.6.40/ext/standard/image.c
+--- php-5.6.40.org/ext/standard/image.c	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/standard/image.c	2021-08-23 23:19:16.415803070 +0200
+@@ -34,7 +34,7 @@
+ #include "win32/php_stdint.h"
  #endif
- #include "php_image.h"
  
 -#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
 +#if HAVE_ZLIB
  #include "zlib.h"
  #endif
  
-@@ -80,7 +80,7 @@
+@@ -84,7 +84,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 @@
+@@ -192,7 +192,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 @@
+@@ -1321,7 +1321,7 @@ static void php_getimagesize_from_stream
  			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/spl-shared.patch b/spl-shared.patch
index 8c10277..7f8a668 100644
--- a/spl-shared.patch
+++ b/spl-shared.patch
@@ -1,6 +1,31 @@
---- php-5.3.1/ext/spl/config.m4~	2009-11-26 23:54:34.000000000 +0000
-+++ php-5.3.1/ext/spl/config.m4	2009-11-27 08:04:05.788823797 +0000
-@@ -22,6 +22,6 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/pdo/pdo.c php-5.6.40/ext/pdo/pdo.c
+--- php-5.6.40.org/ext/pdo/pdo.c	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/pdo/pdo.c	2021-08-23 23:20:05.175752159 +0200
+@@ -132,7 +132,7 @@ const zend_function_entry pdo_functions[
+ /* {{{ pdo_functions[] */
+ #if ZEND_MODULE_API_NO >= 20050922
+ static const zend_module_dep pdo_deps[] = {
+-#ifdef HAVE_SPL
++#ifdef HAVE_SPL && !COMPILE_DL_SPL
+ 	ZEND_MOD_REQUIRED("spl")
+ #endif
+ 	ZEND_MOD_END
+diff -urNp -x '*.orig' php-5.6.40.org/ext/phar/Makefile.frag php-5.6.40/ext/phar/Makefile.frag
+--- php-5.6.40.org/ext/phar/Makefile.frag	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/phar/Makefile.frag	2021-08-23 23:20:05.175752159 +0200
+@@ -9,7 +9,7 @@ PHP_PHARCMD_EXECUTABLE = ` \
+ 		$(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
+ 		if test "x$(PHP_MODULES)" != "x"; then \
+ 		$(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \
+-		for i in bz2 zlib phar; do \
++		for i in pcre spl bz2 zlib phar; do \
+ 			if test -f "$(top_builddir)/modules/$$i.la"; then \
+ 				. $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
+ 			fi; \
+diff -urNp -x '*.orig' php-5.6.40.org/ext/spl/config.m4 php-5.6.40/ext/spl/config.m4
+--- php-5.6.40.org/ext/spl/config.m4	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/spl/config.m4	2021-08-23 23:20:05.175752159 +0200
+@@ -22,6 +22,6 @@ int main(int argc, char **argv) {
    CPPFLAGS=$old_CPPFLAGS
    AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct _zend_object_value is packed])
    AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support]) 
@@ -8,9 +33,10 @@
 +  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, $ext_shared)
    PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_dllist.h spl_heap.h spl_fixedarray.h])
    PHP_ADD_EXTENSION_DEP(spl, pcre, true)
---- php-5.3.1/ext/spl/spl_iterators.c~	2009-07-04 20:31:27.000000000 +0000
-+++ php-5.3.1/ext/spl/spl_iterators.c	2009-11-27 16:35:33.729087793 +0000
-@@ -58,7 +58,13 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/spl/spl_iterators.c php-5.6.40/ext/spl/spl_iterators.c
+--- php-5.6.40.org/ext/spl/spl_iterators.c	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/spl/spl_iterators.c	2021-08-23 23:20:05.175752159 +0200
+@@ -60,7 +60,13 @@ PHPAPI zend_class_entry *spl_ce_EmptyIte
  PHPAPI zend_class_entry *spl_ce_AppendIterator;
  PHPAPI zend_class_entry *spl_ce_RegexIterator;
  PHPAPI zend_class_entry *spl_ce_RecursiveRegexIterator;
@@ -24,7 +50,7 @@
  PHPAPI zend_class_entry *spl_ce_RecursiveTreeIterator;
  
  ZEND_BEGIN_ARG_INFO(arginfo_recursive_it_void, 0)
-@@ -3286,6 +3292,10 @@
+@@ -3839,6 +3845,10 @@ PHP_MINIT_FUNCTION(spl_iterators)
  	REGISTER_SPL_STD_CLASS_EX(EmptyIterator, NULL, spl_funcs_EmptyIterator);
  	REGISTER_SPL_ITERATOR(EmptyIterator);
  
@@ -35,9 +61,10 @@
  	REGISTER_SPL_SUB_CLASS_EX(RecursiveTreeIterator, RecursiveIteratorIterator, spl_RecursiveTreeIterator_new, spl_funcs_RecursiveTreeIterator);
  	REGISTER_SPL_CLASS_CONST_LONG(RecursiveTreeIterator, "BYPASS_CURRENT",      RTIT_BYPASS_CURRENT);
  	REGISTER_SPL_CLASS_CONST_LONG(RecursiveTreeIterator, "BYPASS_KEY",          RTIT_BYPASS_KEY);
---- php-5.4.0alpha3/ext/spl/spl_iterators.h~	2011-07-27 11:48:08.000000000 +0300
-+++ php-5.4.0alpha3/ext/spl/spl_iterators.h	2011-08-08 00:12:10.892993117 +0300
-@@ -51,7 +51,12 @@
+diff -urNp -x '*.orig' php-5.6.40.org/ext/spl/spl_iterators.h php-5.6.40/ext/spl/spl_iterators.h
+--- php-5.6.40.org/ext/spl/spl_iterators.h	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/spl/spl_iterators.h	2021-08-23 23:20:05.175752159 +0200
+@@ -51,7 +51,12 @@ extern PHPAPI zend_class_entry *spl_ce_E
  extern PHPAPI zend_class_entry *spl_ce_AppendIterator;
  extern PHPAPI zend_class_entry *spl_ce_RegexIterator;
  extern PHPAPI zend_class_entry *spl_ce_RecursiveRegexIterator;
@@ -50,8 +77,9 @@
  extern PHPAPI zend_class_entry *spl_ce_CallbackFilterIterator;
  extern PHPAPI zend_class_entry *spl_ce_RecursiveCallbackFilterIterator;
  
---- php-5.3.1/ext/standard/array.c~	2009-08-14 06:20:21.000000000 +0000
-+++ php-5.3.1/ext/standard/array.c	2009-11-27 16:37:15.029078323 +0000
+diff -urNp -x '*.orig' php-5.6.40.org/ext/standard/array.c php-5.6.40/ext/standard/array.c
+--- php-5.6.40.org/ext/standard/array.c	2019-01-09 10:54:13.000000000 +0100
++++ php-5.6.40/ext/standard/array.c	2021-08-23 23:20:05.175752159 +0200
 @@ -49,6 +49,9 @@
  #ifdef HAVE_SPL
  #include "ext/spl/spl_array.h"
@@ -62,25 +90,3 @@
  
  /* {{{ defines */
  #define EXTR_OVERWRITE			0
---- php-5.3.1/ext/pdo/pdo.c~	2009-07-19 22:46:03.000000000 +0000
-+++ php-5.3.1/ext/pdo/pdo.c	2009-11-27 16:37:51.332409104 +0000
-@@ -132,7 +132,7 @@
- /* {{{ pdo_functions[] */
- #if ZEND_MODULE_API_NO >= 20050922
- static const zend_module_dep pdo_deps[] = {
--#ifdef HAVE_SPL
-+#ifdef HAVE_SPL && !COMPILE_DL_SPL
- 	ZEND_MOD_REQUIRED("spl")
- #endif
- 	{NULL, NULL, NULL}
---- php-5.3.1/ext/phar/Makefile.frag~	2009-07-23 15:48:04.000000000 +0000
-+++ php-5.3.1/ext/phar/Makefile.frag	2009-11-30 16:10:29.687175948 +0000
-@@ -10,7 +10,7 @@
- 		$(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
- 		if test "x$(PHP_MODULES)" != "x"; then \
- 		$(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \
--		for i in bz2 zlib phar; do \
-+		for i in pcre spl bz2 zlib phar; do \
- 			if test -f "$(top_builddir)/modules/$$i.la"; then \
- 				. $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
- 			fi; \
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list