Compare commits
No commits in common. "imports/c9-stream-8.1/php-8.1.14-1.module+el9.2.0+17911+b059dfc2" and "c8-stream-7.2" have entirely different histories.
imports/c9
...
c8-stream-
|
@ -1,2 +1 @@
|
|||
SOURCES/php-8.1.14.tar.xz
|
||||
SOURCES/php-keyring.gpg
|
||||
SOURCES/php-7.2.24.tar.xz
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
109167f5ce46470e3ae5ce7fd5d00bfe52bfb490 SOURCES/php-8.1.14.tar.xz
|
||||
84a18625778745667413034f693446ea76846714 SOURCES/php-keyring.gpg
|
||||
d31628bdc89a724a2a0950c2ed7d79b40cf489a7 SOURCES/php-7.2.24.tar.xz
|
||||
|
|
|
@ -5,17 +5,17 @@ zend_extension=opcache
|
|||
opcache.enable=1
|
||||
|
||||
; Determines if Zend OPCache is enabled for the CLI version of PHP
|
||||
opcache.enable_cli=1
|
||||
;opcache.enable_cli=0
|
||||
|
||||
; The OPcache shared memory storage size.
|
||||
;opcache.memory_consumption=128
|
||||
opcache.memory_consumption=128
|
||||
|
||||
; The amount of memory for interned strings in Mbytes.
|
||||
;opcache.interned_strings_buffer=8
|
||||
opcache.interned_strings_buffer=8
|
||||
|
||||
; The maximum number of keys (scripts) in the OPcache hash table.
|
||||
; Only numbers between 200 and 1000000 are allowed.
|
||||
;opcache.max_accelerated_files=10000
|
||||
opcache.max_accelerated_files=4000
|
||||
|
||||
; The maximum percentage of "wasted" memory until a restart is scheduled.
|
||||
;opcache.max_wasted_percentage=5
|
||||
|
@ -42,20 +42,18 @@ opcache.enable_cli=1
|
|||
; size of the optimized code.
|
||||
;opcache.save_comments=1
|
||||
|
||||
; If enabled, compilation warnings (including notices and deprecations) will
|
||||
; be recorded and replayed each time a file is included. Otherwise, compilation
|
||||
; warnings will only be emitted when the file is first cached.
|
||||
;opcache.record_warnings=0
|
||||
; If enabled, a fast shutdown sequence is used for the accelerated code
|
||||
; Depending on the used Memory Manager this may cause some incompatibilities.
|
||||
;opcache.fast_shutdown=0
|
||||
|
||||
; Allow file existence override (file_exists, etc.) performance feature.
|
||||
;opcache.enable_file_override=0
|
||||
|
||||
; A bitmask, where each bit enables or disables the appropriate OPcache
|
||||
; passes
|
||||
;opcache.optimization_level=0x7FFFBFFF
|
||||
;opcache.optimization_level=0xffffffff
|
||||
|
||||
; This hack should only be enabled to work around "Cannot redeclare class"
|
||||
; errors.
|
||||
;opcache.inherited_hack=1
|
||||
;opcache.dups_fix=0
|
||||
|
||||
; The location of the OPcache blacklist file (wildcards allowed).
|
||||
|
@ -114,10 +112,6 @@ opcache.blacklist_filename=/etc/php.d/opcache*.blacklist
|
|||
; cache is required.
|
||||
;opcache.file_cache_fallback=1
|
||||
|
||||
; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
|
||||
; This should improve performance, but requires appropriate OS configuration.
|
||||
opcache.huge_code_pages=0
|
||||
|
||||
; Validate cached file permissions.
|
||||
; Leads OPcache to check file readability on each access to cached file.
|
||||
; This directive should be enabled in shared hosting environment, when few
|
||||
|
@ -130,24 +124,7 @@ opcache.huge_code_pages=0
|
|||
; different "chroot" environments.
|
||||
;opcache.validate_root=0
|
||||
|
||||
; If specified, it produces opcode dumps for debugging different stages of
|
||||
; optimizations.
|
||||
;opcache.opt_debug_level=0
|
||||
; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
|
||||
; This should improve performance, but requires appropriate OS configuration.
|
||||
opcache.huge_code_pages=0
|
||||
|
||||
; Specifies a PHP script that is going to be compiled and executed at server
|
||||
; start-up.
|
||||
; https://php.net/opcache.preload
|
||||
;opcache.preload=
|
||||
|
||||
; Preloading code as root is not allowed for security reasons. This directive
|
||||
; facilitates to let the preloading to be run as another user.
|
||||
; https://php.net/opcache.preload_user
|
||||
;opcache.preload_user=
|
||||
|
||||
; Prevents caching files that are less than this number of seconds old. It
|
||||
; protects from caching of incompletely updated files. In case all file updates
|
||||
; on your site are atomic, you may increase performance by setting it to "0".
|
||||
;opcache.file_update_protection=2
|
||||
|
||||
; Absolute path used to store shared lockfiles (for *nix only).
|
||||
;opcache.lockfile_path=/tmp
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
; Enable ffi extension module
|
||||
extension=ffi
|
||||
|
||||
; FFI API restriction. Possibe values:
|
||||
; "preload" - enabled in CLI scripts and preloaded files (default)
|
||||
; "false" - always disabled
|
||||
; "true" - always enabled
|
||||
;ffi.enable=preload
|
||||
|
||||
; List of headers files to preload, wildcard patterns allowed.
|
||||
; /usr/share/php/preload used by for RPM packages
|
||||
; /usr/local/share/php/preload may be used for local files
|
||||
ffi.preload=/usr/share/php/preload/*.h:/usr/local/share/php/preload/*.h
|
|
@ -0,0 +1,17 @@
|
|||
diff -up php-5.3.0beta1/ext/recode/config9.m4.recode php-5.3.0beta1/ext/recode/config9.m4
|
||||
--- php-5.3.0beta1/ext/recode/config9.m4.recode 2008-12-02 00:30:21.000000000 +0100
|
||||
+++ php-5.3.0beta1/ext/recode/config9.m4 2009-02-28 09:46:50.000000000 +0100
|
||||
@@ -4,13 +4,6 @@ dnl
|
||||
|
||||
dnl Check for extensions with which Recode can not work
|
||||
if test "$PHP_RECODE" != "no"; then
|
||||
- test "$PHP_IMAP" != "no" && recode_conflict="$recode_conflict imap"
|
||||
-
|
||||
- if test -n "$MYSQL_LIBNAME"; then
|
||||
- PHP_CHECK_LIBRARY($MYSQL_LIBNAME, hash_insert, [
|
||||
- recode_conflict="$recode_conflict mysql"
|
||||
- ])
|
||||
- fi
|
||||
|
||||
if test -n "$recode_conflict"; then
|
||||
AC_MSG_ERROR([recode extension can not be configured together with:$recode_conflict])
|
|
@ -0,0 +1,23 @@
|
|||
--- a/ext/date/tests/bug66985.phpt 2014-10-30 07:32:03.297693403 +0100
|
||||
+++ b/ext/date/tests/bug66985.phpt 2014-10-30 07:32:45.138877977 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
--FILE--
|
||||
<?php
|
||||
$zones = array(
|
||||
- "CST6CDT", "Cuba", "Egypt", "Eire", "EST5EDT", "Factory", "GB-Eire",
|
||||
+ "CST6CDT", "Cuba", "Egypt", "Eire", "EST5EDT", "GB-Eire",
|
||||
"GMT0", "Greenwich", "Hongkong", "Iceland", "Iran", "Israel", "Jamaica",
|
||||
"Japan", "Kwajalein", "Libya", "MST7MDT", "Navajo", "NZ-CHAT", "Poland",
|
||||
"Portugal", "PST8PDT", "Singapore", "Turkey", "Universal", "W-SU",
|
||||
@@ -45,11 +45,6 @@
|
||||
)
|
||||
DateTimeZone Object
|
||||
(
|
||||
- [timezone_type] => 3
|
||||
- [timezone] => Factory
|
||||
-)
|
||||
-DateTimeZone Object
|
||||
-(
|
||||
[timezone_type] => 3
|
||||
[timezone] => GB-Eire
|
||||
)
|
|
@ -1,25 +1,24 @@
|
|||
diff -up ./sapi/embed/config.m4.embed ./sapi/embed/config.m4
|
||||
--- ./sapi/embed/config.m4.embed 2020-07-07 13:51:05.879764972 +0200
|
||||
+++ ./sapi/embed/config.m4 2020-07-07 13:52:50.128412148 +0200
|
||||
--- php-5.6.3/sapi/embed/config.m4.embed
|
||||
+++ php-5.6.3/sapi/embed/config.m4
|
||||
@@ -12,7 +12,8 @@ if test "$PHP_EMBED" != "no"; then
|
||||
case "$PHP_EMBED" in
|
||||
yes|shared)
|
||||
LIBPHP_CFLAGS="-shared"
|
||||
PHP_EMBED_TYPE=shared
|
||||
- INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(prefix)/lib"
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -release \$(PHP_MAJOR_VERSION).\$(PHP_MINOR_VERSION)"
|
||||
+ INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(libdir); \$(LIBTOOL) --mode=install \$(INSTALL) -m 0755 \$(OVERALL_TARGET) \$(INSTALL_ROOT)\$(libdir)"
|
||||
;;
|
||||
static)
|
||||
LIBPHP_CFLAGS="-static"
|
||||
diff -up ./scripts/php-config.in.embed ./scripts/php-config.in
|
||||
--- ./scripts/php-config.in.embed 2020-07-07 12:54:42.000000000 +0200
|
||||
+++ ./scripts/php-config.in 2020-07-07 13:51:05.880764968 +0200
|
||||
PHP_EMBED_TYPE=static
|
||||
diff -up php-5.5.30/scripts/php-config.in.old php-5.5.30/scripts/php-config.in
|
||||
--- php-5.5.30/scripts/php-config.in.old 2015-10-19 15:17:31.944747715 +0200
|
||||
+++ php-5.5.30/scripts/php-config.in 2015-10-19 15:17:58.278858083 +0200
|
||||
@@ -18,7 +18,7 @@ exe_extension="@EXEEXT@"
|
||||
php_cli_binary=NONE
|
||||
php_cgi_binary=NONE
|
||||
configure_options="@CONFIGURE_OPTIONS@"
|
||||
-php_sapis="@PHP_INSTALLED_SAPIS@"
|
||||
+php_sapis="apache2handler litespeed fpm phpdbg @PHP_INSTALLED_SAPIS@"
|
||||
ini_dir="@EXPANDED_PHP_CONFIG_FILE_SCAN_DIR@"
|
||||
ini_path="@EXPANDED_PHP_CONFIG_FILE_PATH@"
|
||||
+php_sapis="apache2handler embed fpm @PHP_INSTALLED_SAPIS@"
|
||||
|
||||
# Set php_cli_binary and php_cgi_binary if available
|
||||
for sapi in $php_sapis; do
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
Drop "Configure Command" from phpinfo as it doesn't
|
||||
provide any useful information.
|
||||
The available extensions are not related to this command.
|
||||
|
||||
--- php-5.4.9/ext/standard/info.c.orig 2012-12-11 10:43:02.450578276 +0100
|
||||
+++ php-5.4.9/ext/standard/info.c 2012-12-11 10:44:12.530820821 +0100
|
||||
@@ -743,9 +743,6 @@
|
||||
#ifdef ARCHITECTURE
|
||||
php_info_print_table_row(2, "Architecture", ARCHITECTURE);
|
||||
#endif
|
||||
-#ifdef CONFIGURE_COMMAND
|
||||
- php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
|
||||
-#endif
|
||||
|
||||
if (sapi_module.pretty_name) {
|
||||
php_info_print_table_row(2, "Server API", sapi_module.pretty_name );
|
||||
--- php-5.4.9/ext/standard/tests/general_functions/phpinfo.phpt.orig 2012-12-11 11:07:26.959156091 +0100
|
||||
+++ php-5.4.9/ext/standard/tests/general_functions/phpinfo.phpt 2012-12-11 11:07:30.899170970 +0100
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
System => %s
|
||||
Build Date => %s%a
|
||||
-Configure Command => %s
|
||||
Server API => Command Line Interface
|
||||
Virtual Directory Support => %s
|
||||
Configuration File (php.ini) Path => %s
|
|
@ -5,9 +5,10 @@ mod_php is build twice
|
|||
- as ZTS using --enable-maintainer-zts
|
||||
|
||||
diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4
|
||||
index 2e64b21..ec4799f 100644
|
||||
--- a/sapi/apache2handler/config.m4
|
||||
+++ b/sapi/apache2handler/config.m4
|
||||
@@ -105,17 +105,6 @@ if test "$PHP_APXS2" != "no"; then
|
||||
@@ -116,17 +116,6 @@ if test "$PHP_APXS2" != "no"; then
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -17,7 +18,7 @@ diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4
|
|||
- PHP_BUILD_THREAD_SAFE
|
||||
- fi
|
||||
- else
|
||||
- APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes'`
|
||||
- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
|
||||
- if test -n "$APACHE_THREADED_MPM"; then
|
||||
- PHP_BUILD_THREAD_SAFE
|
||||
- fi
|
|
@ -1,7 +1,7 @@
|
|||
diff -up ./ext/dba/config.m4.libdb ./ext/dba/config.m4
|
||||
--- ./ext/dba/config.m4.libdb 2020-04-09 14:06:11.000000000 +0200
|
||||
+++ ./ext/dba/config.m4 2020-04-09 14:35:08.208605065 +0200
|
||||
@@ -375,61 +375,13 @@ if test "$PHP_DB4" != "no"; then
|
||||
diff -up php-7.2.0alpha0/ext/dba/config.m4.libdb php-7.2.0alpha0/ext/dba/config.m4
|
||||
--- php-7.2.0alpha0/ext/dba/config.m4.libdb 2017-05-29 08:56:06.000000000 +0200
|
||||
+++ php-7.2.0alpha0/ext/dba/config.m4 2017-05-29 09:13:52.014823282 +0200
|
||||
@@ -346,61 +346,13 @@ if test "$PHP_DB4" != "no"; then
|
||||
dbdp4="/usr/local/BerkeleyDB.4."
|
||||
dbdp5="/usr/local/BerkeleyDB.5."
|
||||
for i in $PHP_DB4 ${dbdp5}1 ${dbdp5}0 ${dbdp4}8 ${dbdp4}7 ${dbdp4}6 ${dbdp4}5 ${dbdp4}4 ${dbdp4}3 ${dbdp4}2 ${dbdp4}1 ${dbdp}0 /usr/local /usr; do
|
||||
|
@ -65,24 +65,24 @@ diff -up ./ext/dba/config.m4.libdb ./ext/dba/config.m4
|
|||
fi
|
||||
PHP_DBA_STD_RESULT(db4,Berkeley DB4)
|
||||
|
||||
diff -up ./ext/dba/dba.c.libdb ./ext/dba/dba.c
|
||||
--- ./ext/dba/dba.c.libdb 2020-04-09 14:06:11.000000000 +0200
|
||||
+++ ./ext/dba/dba.c 2020-04-09 14:36:30.593275190 +0200
|
||||
@@ -50,6 +50,10 @@
|
||||
diff -up php-7.2.0alpha0/ext/dba/dba.c.libdb php-7.2.0alpha0/ext/dba/dba.c
|
||||
--- php-7.2.0alpha0/ext/dba/dba.c.libdb 2017-05-29 09:16:15.736628202 +0200
|
||||
+++ php-7.2.0alpha0/ext/dba/dba.c 2017-05-29 09:16:20.494654746 +0200
|
||||
@@ -53,6 +53,10 @@
|
||||
#include "php_tcadb.h"
|
||||
#include "php_lmdb.h"
|
||||
#include "dba_arginfo.h"
|
||||
|
||||
+#ifdef DB4_INCLUDE_FILE
|
||||
+#include DB4_INCLUDE_FILE
|
||||
+#endif
|
||||
+
|
||||
PHP_MINIT_FUNCTION(dba);
|
||||
PHP_MSHUTDOWN_FUNCTION(dba);
|
||||
PHP_MINFO_FUNCTION(dba);
|
||||
@@ -452,6 +456,10 @@ PHP_MINFO_FUNCTION(dba)
|
||||
/* {{{ arginfo */
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_popen, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, path)
|
||||
@@ -558,6 +562,10 @@ PHP_MINFO_FUNCTION(dba)
|
||||
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "DBA support", "enabled");
|
||||
php_info_print_table_row(2, "DBA support", "enabled");
|
||||
+#ifdef DB_VERSION_STRING
|
||||
+ php_info_print_table_row(2, "libdb header version", DB_VERSION_STRING);
|
||||
+ php_info_print_table_row(2, "libdb library version", db_version(NULL, NULL, NULL));
|
|
@ -1,7 +1,7 @@
|
|||
diff -up ./scripts/phpize.in.headers ./scripts/phpize.in
|
||||
--- ./scripts/phpize.in.headers 2019-07-23 10:05:11.000000000 +0200
|
||||
+++ ./scripts/phpize.in 2019-07-23 10:18:13.648098089 +0200
|
||||
@@ -165,6 +165,15 @@ phpize_autotools()
|
||||
diff -up php-7.2.12RC1/scripts/phpize.in.headers php-7.2.12RC1/scripts/phpize.in
|
||||
--- php-7.2.12RC1/scripts/phpize.in.headers 2018-10-23 11:47:43.000000000 +0200
|
||||
+++ php-7.2.12RC1/scripts/phpize.in 2018-10-23 11:49:51.651818777 +0200
|
||||
@@ -162,6 +162,15 @@ phpize_autotools()
|
||||
$PHP_AUTOHEADER || exit 1
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ diff -up ./scripts/phpize.in.headers ./scripts/phpize.in
|
|||
# Main script
|
||||
|
||||
case "$1" in
|
||||
@@ -183,12 +192,15 @@ case "$1" in
|
||||
@@ -180,12 +189,15 @@ case "$1" in
|
||||
|
||||
# Version
|
||||
--version|-v)
|
|
@ -5,12 +5,7 @@ Add support for use of the system timezone database, rather
|
|||
than embedding a copy. Discussed upstream but was not desired.
|
||||
|
||||
History:
|
||||
r22: retrieve tzdata version from /usr/share/zoneinfo/tzdata.zi
|
||||
r21: adapt for timelib 2021.03 (in 8.1.0)
|
||||
r20: adapt for timelib 2020.03 (in 8.0.10RC1)
|
||||
r19: adapt for timelib 2020.02 (in 8.0.0beta2)
|
||||
r18: adapt for autotool change in 7.3.3RC1
|
||||
r17: adapt for timelib 2018.01 (in 7.3.2RC1)
|
||||
r17: adapt for autotool change in 7.2.16RC1
|
||||
r16: adapt for timelib 2017.06 (in 7.2.3RC1)
|
||||
r15: adapt for timelib 2017.05beta7 (in 7.2.0RC1)
|
||||
r14: improve check for valid tz file
|
||||
|
@ -33,11 +28,10 @@ r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert)
|
|||
r2: add filesystem trawl to set up name alias index
|
||||
r1: initial revision
|
||||
|
||||
diff --git a/ext/date/config0.m4 b/ext/date/config0.m4
|
||||
index 18b8106bd2..3d1f63c758 100644
|
||||
--- a/ext/date/config0.m4
|
||||
+++ b/ext/date/config0.m4
|
||||
@@ -4,6 +4,19 @@ AC_CHECK_HEADERS([io.h])
|
||||
diff -up php-7.2.16RC1/ext/date/config0.m4.systzdata php-7.2.16RC1/ext/date/config0.m4
|
||||
--- php-7.2.16RC1/ext/date/config0.m4.systzdata 2019-02-19 11:22:22.223741585 +0100
|
||||
+++ php-7.2.16RC1/ext/date/config0.m4 2019-02-19 11:23:05.089111556 +0100
|
||||
@@ -10,6 +10,19 @@ io.h
|
||||
dnl Check for strtoll, atoll
|
||||
AC_CHECK_FUNCS(strtoll atoll)
|
||||
|
||||
|
@ -54,14 +48,13 @@ index 18b8106bd2..3d1f63c758 100644
|
|||
+ fi
|
||||
+fi
|
||||
+
|
||||
PHP_DATE_CFLAGS="-Wno-implicit-fallthrough -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
|
||||
timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c lib/parse_posix.c
|
||||
PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
|
||||
timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c
|
||||
lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"
|
||||
diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
|
||||
index e41315efdb..4b6547c0a3 100644
|
||||
--- a/ext/date/lib/parse_tz.c
|
||||
+++ b/ext/date/lib/parse_tz.c
|
||||
@@ -26,9 +26,22 @@
|
||||
diff -up php-7.2.16RC1/ext/date/lib/parse_tz.c.systzdata php-7.2.16RC1/ext/date/lib/parse_tz.c
|
||||
--- php-7.2.16RC1/ext/date/lib/parse_tz.c.systzdata 2019-02-19 11:13:22.000000000 +0100
|
||||
+++ php-7.2.16RC1/ext/date/lib/parse_tz.c 2019-02-19 11:19:40.245313535 +0100
|
||||
@@ -25,8 +25,21 @@
|
||||
#include "timelib.h"
|
||||
#include "timelib_private.h"
|
||||
|
||||
|
@ -76,7 +69,6 @@ index e41315efdb..4b6547c0a3 100644
|
|||
+
|
||||
+#else
|
||||
#define TIMELIB_SUPPORTS_V2DATA
|
||||
#define TIMELIB_SUPPORT_SLIM_FILE
|
||||
#include "timezonedb.h"
|
||||
+#endif
|
||||
+
|
||||
|
@ -84,7 +76,7 @@ index e41315efdb..4b6547c0a3 100644
|
|||
|
||||
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
|
||||
# if defined(__LITTLE_ENDIAN__)
|
||||
@@ -95,6 +108,11 @@ static int read_php_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
|
||||
@@ -67,6 +80,11 @@ static int read_php_preamble(const unsig
|
||||
{
|
||||
uint32_t version;
|
||||
|
||||
|
@ -96,11 +88,11 @@ index e41315efdb..4b6547c0a3 100644
|
|||
/* read ID */
|
||||
version = (*tzf)[3] - '0';
|
||||
*tzf += 4;
|
||||
@@ -577,7 +595,467 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
|
||||
@@ -374,7 +392,429 @@ void timelib_dump_tzinfo(timelib_tzinfo
|
||||
}
|
||||
}
|
||||
|
||||
-static int seek_to_tz_position(const unsigned char **tzf, const char *timezone, const timelib_tzdb *tzdb)
|
||||
-static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb)
|
||||
+#ifdef HAVE_SYSTEM_TZDATA
|
||||
+
|
||||
+#ifdef HAVE_SYSTEM_TZDATA_PREFIX
|
||||
|
@ -326,44 +318,6 @@ index e41315efdb..4b6547c0a3 100644
|
|||
+ return timelib_strcasecmp(alpha->id, beta->id);
|
||||
+}
|
||||
+
|
||||
+/* Retrieve tzdata version. */
|
||||
+static void retrieve_zone_version(timelib_tzdb *db)
|
||||
+{
|
||||
+ static char buf[30];
|
||||
+ char path[PATH_MAX];
|
||||
+ FILE *fp;
|
||||
+
|
||||
+ strncpy(path, ZONEINFO_PREFIX "/tzdata.zi", sizeof(path));
|
||||
+
|
||||
+ fp = fopen(path, "r");
|
||||
+ if (fp) {
|
||||
+ if (fgets(buf, sizeof(buf), fp)) {
|
||||
+ if (!memcmp(buf, "# version ", 10) &&
|
||||
+ isdigit(buf[10]) &&
|
||||
+ isdigit(buf[11]) &&
|
||||
+ isdigit(buf[12]) &&
|
||||
+ isdigit(buf[13]) &&
|
||||
+ islower(buf[14])) {
|
||||
+ if (buf[14] >= 't') { /* 2022t = 2022.20 */
|
||||
+ buf[17] = 0;
|
||||
+ buf[16] = buf[14] - 't' + '0';
|
||||
+ buf[15] = '2';
|
||||
+ } else if (buf[14] >= 'j') { /* 2022j = 2022.10 */
|
||||
+ buf[17] = 0;
|
||||
+ buf[16] = buf[14] - 'j' + '0';
|
||||
+ buf[15] = '1';
|
||||
+ } else { /* 2022a = 2022.1 */
|
||||
+ buf[16] = 0;
|
||||
+ buf[15] = buf[14] - 'a' + '1';
|
||||
+ }
|
||||
+ buf[14] = '.';
|
||||
+ db->version = buf+10;
|
||||
+ }
|
||||
+ }
|
||||
+ fclose(fp);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/* Create the zone identifier index by trawling the filesystem. */
|
||||
+static void create_zone_index(timelib_tzdb *db)
|
||||
|
@ -561,15 +515,15 @@ index e41315efdb..4b6547c0a3 100644
|
|||
+
|
||||
+#endif
|
||||
+
|
||||
+static int inmem_seek_to_tz_position(const unsigned char **tzf, const char *timezone, const timelib_tzdb *tzdb)
|
||||
+static int inmem_seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb)
|
||||
{
|
||||
int left = 0, right = tzdb->index_size - 1;
|
||||
|
||||
@@ -603,9 +1081,49 @@ static int seek_to_tz_position(const unsigned char **tzf, const char *timezone,
|
||||
@@ -400,9 +840,48 @@ static int seek_to_tz_position(const uns
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int seek_to_tz_position(const unsigned char **tzf, const char *timezone,
|
||||
+static int seek_to_tz_position(const unsigned char **tzf, char *timezone,
|
||||
+ char **map, size_t *maplen,
|
||||
+ const timelib_tzdb *tzdb)
|
||||
+{
|
||||
|
@ -602,7 +556,6 @@ index e41315efdb..4b6547c0a3 100644
|
|||
+ tmp->version = "0.system";
|
||||
+ tmp->data = NULL;
|
||||
+ create_zone_index(tmp);
|
||||
+ retrieve_zone_version(tmp);
|
||||
+ system_location_table = create_location_table();
|
||||
+ fake_data_segment(tmp, system_location_table);
|
||||
+ timezonedb_system = tmp;
|
||||
|
@ -615,8 +568,8 @@ index e41315efdb..4b6547c0a3 100644
|
|||
}
|
||||
|
||||
const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count)
|
||||
@@ -617,7 +1135,30 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_
|
||||
int timelib_timezone_id_is_valid(const char *timezone, const timelib_tzdb *tzdb)
|
||||
@@ -414,7 +893,30 @@ const timelib_tzdb_index_entry *timelib_
|
||||
int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb)
|
||||
{
|
||||
const unsigned char *tzf;
|
||||
- return (seek_to_tz_position(&tzf, timezone, tzdb));
|
||||
|
@ -647,8 +600,8 @@ index e41315efdb..4b6547c0a3 100644
|
|||
}
|
||||
|
||||
static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
|
||||
@@ -662,6 +1203,8 @@ static timelib_tzinfo* timelib_tzinfo_ctor(const char *name)
|
||||
timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *tzdb, int *error_code)
|
||||
@@ -456,12 +958,14 @@ static timelib_tzinfo* timelib_tzinfo_ct
|
||||
timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, int *error_code)
|
||||
{
|
||||
const unsigned char *tzf;
|
||||
+ char *memmap = NULL;
|
||||
|
@ -656,19 +609,18 @@ index e41315efdb..4b6547c0a3 100644
|
|||
timelib_tzinfo *tmp;
|
||||
int version;
|
||||
int transitions_result, types_result;
|
||||
@@ -669,7 +1212,7 @@ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *t
|
||||
|
||||
*error_code = TIMELIB_ERROR_NO_ERROR;
|
||||
unsigned int type; /* TIMELIB_TZINFO_PHP or TIMELIB_TZINFO_ZONEINFO */
|
||||
|
||||
- if (seek_to_tz_position(&tzf, timezone, tzdb)) {
|
||||
+ if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) {
|
||||
tmp = timelib_tzinfo_ctor(timezone);
|
||||
|
||||
version = read_preamble(&tzf, tmp, &type);
|
||||
@@ -712,11 +1255,36 @@ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *t
|
||||
@@ -484,6 +988,29 @@ timelib_tzinfo *timelib_parse_tzfile(cha
|
||||
timelib_tzinfo_dtor(tmp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+
|
||||
+#ifdef HAVE_SYSTEM_TZDATA
|
||||
+ if (memmap) {
|
||||
+ const struct location_info *li;
|
||||
|
@ -691,8 +643,10 @@ index e41315efdb..4b6547c0a3 100644
|
|||
+ munmap(memmap, maplen);
|
||||
+ } else {
|
||||
+#endif
|
||||
if (type == TIMELIB_TZINFO_PHP) {
|
||||
read_location(&tzf, tmp);
|
||||
if (version == 2 || version == 3) {
|
||||
if (!skip_64bit_preamble(&tzf, tmp)) {
|
||||
/* 64 bit preamble is not in place */
|
||||
@@ -501,6 +1028,9 @@ timelib_tzinfo *timelib_parse_tzfile(cha
|
||||
} else {
|
||||
set_default_location_and_comments(&tzf, tmp);
|
||||
}
|
||||
|
@ -702,19 +656,3 @@ index e41315efdb..4b6547c0a3 100644
|
|||
} else {
|
||||
*error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE;
|
||||
tmp = NULL;
|
||||
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
|
||||
index cf4a11b8a2..cd49abc78d 100644
|
||||
--- a/ext/date/php_date.c
|
||||
+++ b/ext/date/php_date.c
|
||||
@@ -457,7 +457,11 @@ PHP_MINFO_FUNCTION(date)
|
||||
php_info_print_table_row(2, "date/time support", "enabled");
|
||||
php_info_print_table_row(2, "timelib version", TIMELIB_ASCII_VERSION);
|
||||
php_info_print_table_row(2, "\"Olson\" Timezone Database Version", tzdb->version);
|
||||
+#ifdef HAVE_SYSTEM_TZDATA
|
||||
+ php_info_print_table_row(2, "Timezone Database", "system");
|
||||
+#else
|
||||
php_info_print_table_row(2, "Timezone Database", php_date_global_timezone_db_enabled ? "external" : "internal");
|
||||
+#endif
|
||||
php_info_print_table_row(2, "Default timezone", guess_timezone(tzdb));
|
||||
php_info_print_table_end();
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
Use -lldap_r by default.
|
||||
|
||||
diff -up php-7.4.0RC2/ext/ldap/config.m4.ldap_r php-7.4.0RC2/ext/ldap/config.m4
|
||||
--- php-7.4.0RC2/ext/ldap/config.m4.ldap_r 2019-09-17 10:21:24.769200812 +0200
|
||||
+++ php-7.4.0RC2/ext/ldap/config.m4 2019-09-17 10:21:30.658181771 +0200
|
||||
@@ -68,7 +68,11 @@ if test "$PHP_LDAP" != "no"; then
|
||||
dnl -pc removal is a hack for clang
|
||||
MACHINE_INCLUDES=$($CC -dumpmachine | $SED 's/-pc//')
|
||||
diff -up php-7.2.3RC1/ext/ldap/config.m4.ldap_r php-7.2.3RC1/ext/ldap/config.m4
|
||||
--- php-7.2.3RC1/ext/ldap/config.m4.ldap_r 2018-02-14 06:05:11.553142812 +0100
|
||||
+++ php-7.2.3RC1/ext/ldap/config.m4 2018-02-14 06:07:31.179816122 +0100
|
||||
@@ -119,7 +119,11 @@ if test "$PHP_LDAP" != "no"; then
|
||||
|
||||
MACHINE_INCLUDES=$($CC -dumpmachine)
|
||||
|
||||
- if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.a || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.$SHLIB_SUFFIX_NAME; then
|
||||
+ if test -f $LDAP_LIBDIR/libldap_r.$SHLIB_SUFFIX_NAME; then
|
|
@ -0,0 +1,30 @@
|
|||
diff -up php-7.2.4RC1/sapi/litespeed/lsapilib.c.dlopen php-7.2.4RC1/sapi/litespeed/lsapilib.c
|
||||
--- php-7.2.4RC1/sapi/litespeed/lsapilib.c.dlopen 2018-03-13 12:40:25.330885880 +0100
|
||||
+++ php-7.2.4RC1/sapi/litespeed/lsapilib.c 2018-03-13 12:41:35.797251042 +0100
|
||||
@@ -755,7 +755,7 @@ static int (*fp_lve_leave)(struct liblve
|
||||
static int (*fp_lve_jail)( struct passwd *, char *) = NULL;
|
||||
static int lsapi_load_lve_lib(void)
|
||||
{
|
||||
- s_liblve = dlopen("liblve.so.0", RTLD_LAZY);
|
||||
+ s_liblve = dlopen("liblve.so.0", RTLD_NOW);
|
||||
if (s_liblve)
|
||||
{
|
||||
fp_lve_is_available = dlsym(s_liblve, "lve_is_available");
|
||||
diff -up php-7.2.4RC1/Zend/zend_portability.h.dlopen php-7.2.4RC1/Zend/zend_portability.h
|
||||
--- php-7.2.4RC1/Zend/zend_portability.h.dlopen 2018-03-13 12:33:38.000000000 +0100
|
||||
+++ php-7.2.4RC1/Zend/zend_portability.h 2018-03-13 12:40:25.330885880 +0100
|
||||
@@ -144,11 +144,11 @@
|
||||
# endif
|
||||
|
||||
# if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT)
|
||||
-# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
|
||||
+# define DL_LOAD(libname) dlopen(libname, RTLD_NOW | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
|
||||
# elif defined(RTLD_DEEPBIND) && !defined(__SANITIZE_ADDRESS__)
|
||||
-# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND)
|
||||
+# define DL_LOAD(libname) dlopen(libname, RTLD_NOW | RTLD_GLOBAL | RTLD_DEEPBIND)
|
||||
# else
|
||||
-# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
|
||||
+# define DL_LOAD(libname) dlopen(libname, RTLD_NOW | RTLD_GLOBAL)
|
||||
# endif
|
||||
# define DL_UNLOAD dlclose
|
||||
# if defined(DLSYM_NEEDS_UNDERSCORE)
|
|
@ -0,0 +1,12 @@
|
|||
diff -up php-7.2.4RC1/configure.ac.fixheader php-7.2.4RC1/configure.ac
|
||||
--- php-7.2.4RC1/configure.ac.fixheader 2018-03-13 12:42:47.594623100 +0100
|
||||
+++ php-7.2.4RC1/configure.ac 2018-03-13 12:43:35.591871825 +0100
|
||||
@@ -1275,7 +1275,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
|
||||
|
||||
-PHP_UNAME=`uname -a | xargs`
|
||||
+PHP_UNAME=`uname | xargs`
|
||||
AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
|
||||
PHP_OS=`uname | xargs`
|
||||
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
|
|
@ -0,0 +1,280 @@
|
|||
Adapted for 7.2.7 from 7.3 by remi
|
||||
|
||||
|
||||
From 0ea4013f101d64fbeb9221260b36e98f10ed1ddd Mon Sep 17 00:00:00 2001
|
||||
From: Remi Collet <remi@remirepo.net>
|
||||
Date: Wed, 4 Jul 2018 08:48:38 +0200
|
||||
Subject: [PATCH] Fixed bug #62596 add getallheaders (apache_request_headers)
|
||||
missing function in FPM add sapi_add_request_header in public API (was
|
||||
add_request_header) fix arginfo for fastcgi_finish_request fucntion
|
||||
|
||||
---
|
||||
main/SAPI.c | 50 +++++++++++++++++++++++++++++
|
||||
main/SAPI.h | 1 +
|
||||
sapi/cgi/cgi_main.c | 51 +----------------------------
|
||||
sapi/fpm/fpm/fpm_main.c | 25 ++++++++++++++-
|
||||
sapi/fpm/tests/getallheaders.phpt | 67 +++++++++++++++++++++++++++++++++++++++
|
||||
5 files changed, 143 insertions(+), 51 deletions(-)
|
||||
create mode 100644 sapi/fpm/tests/getallheaders.phpt
|
||||
|
||||
diff --git a/main/SAPI.c b/main/SAPI.c
|
||||
index b6c3329..7e0c7c8 100644
|
||||
--- a/main/SAPI.c
|
||||
+++ b/main/SAPI.c
|
||||
@@ -1104,6 +1104,56 @@ SAPI_API void sapi_terminate_process(void) {
|
||||
}
|
||||
}
|
||||
|
||||
+SAPI_API void sapi_add_request_header(char *var, unsigned int var_len, char *val, unsigned int val_len, void *arg) /* {{{ */
|
||||
+{
|
||||
+ zval *return_value = (zval*)arg;
|
||||
+ char *str = NULL;
|
||||
+
|
||||
+ ALLOCA_FLAG(use_heap)
|
||||
+
|
||||
+ if (var_len > 5 &&
|
||||
+ var[0] == 'H' &&
|
||||
+ var[1] == 'T' &&
|
||||
+ var[2] == 'T' &&
|
||||
+ var[3] == 'P' &&
|
||||
+ var[4] == '_') {
|
||||
+
|
||||
+ char *p;
|
||||
+
|
||||
+ var_len -= 5;
|
||||
+ p = var + 5;
|
||||
+ var = str = do_alloca(var_len + 1, use_heap);
|
||||
+ *str++ = *p++;
|
||||
+ while (*p) {
|
||||
+ if (*p == '_') {
|
||||
+ *str++ = '-';
|
||||
+ p++;
|
||||
+ if (*p) {
|
||||
+ *str++ = *p++;
|
||||
+ }
|
||||
+ } else if (*p >= 'A' && *p <= 'Z') {
|
||||
+ *str++ = (*p++ - 'A' + 'a');
|
||||
+ } else {
|
||||
+ *str++ = *p++;
|
||||
+ }
|
||||
+ }
|
||||
+ *str = 0;
|
||||
+ } else if (var_len == sizeof("CONTENT_TYPE")-1 &&
|
||||
+ memcmp(var, "CONTENT_TYPE", sizeof("CONTENT_TYPE")-1) == 0) {
|
||||
+ var = "Content-Type";
|
||||
+ } else if (var_len == sizeof("CONTENT_LENGTH")-1 &&
|
||||
+ memcmp(var, "CONTENT_LENGTH", sizeof("CONTENT_LENGTH")-1) == 0) {
|
||||
+ var = "Content-Length";
|
||||
+ } else {
|
||||
+ return;
|
||||
+ }
|
||||
+ add_assoc_stringl_ex(return_value, var, var_len, val, val_len);
|
||||
+ if (str) {
|
||||
+ free_alloca(var, use_heap);
|
||||
+ }
|
||||
+}
|
||||
+/* }}} */
|
||||
+
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
diff --git a/main/SAPI.h b/main/SAPI.h
|
||||
index f829fd7..4b8e223 100644
|
||||
--- a/main/SAPI.h
|
||||
+++ b/main/SAPI.h
|
||||
@@ -151,6 +151,7 @@ SAPI_API void sapi_shutdown(void);
|
||||
SAPI_API void sapi_activate(void);
|
||||
SAPI_API void sapi_deactivate(void);
|
||||
SAPI_API void sapi_initialize_empty_request(void);
|
||||
+SAPI_API void sapi_add_request_header(char *var, unsigned int var_len, char *val, unsigned int val_len, void *arg);
|
||||
END_EXTERN_C()
|
||||
|
||||
/*
|
||||
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
|
||||
index 2e9cefe..350846d 100644
|
||||
--- a/sapi/cgi/cgi_main.c
|
||||
+++ b/sapi/cgi/cgi_main.c
|
||||
@@ -1591,54 +1591,6 @@ PHP_FUNCTION(apache_child_terminate) /*
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
-static void add_request_header(char *var, unsigned int var_len, char *val, unsigned int val_len, void *arg) /* {{{ */
|
||||
-{
|
||||
- zval *return_value = (zval*)arg;
|
||||
- char *str = NULL;
|
||||
- char *p;
|
||||
- ALLOCA_FLAG(use_heap)
|
||||
-
|
||||
- if (var_len > 5 &&
|
||||
- var[0] == 'H' &&
|
||||
- var[1] == 'T' &&
|
||||
- var[2] == 'T' &&
|
||||
- var[3] == 'P' &&
|
||||
- var[4] == '_') {
|
||||
-
|
||||
- var_len -= 5;
|
||||
- p = var + 5;
|
||||
- var = str = do_alloca(var_len + 1, use_heap);
|
||||
- *str++ = *p++;
|
||||
- while (*p) {
|
||||
- if (*p == '_') {
|
||||
- *str++ = '-';
|
||||
- p++;
|
||||
- if (*p) {
|
||||
- *str++ = *p++;
|
||||
- }
|
||||
- } else if (*p >= 'A' && *p <= 'Z') {
|
||||
- *str++ = (*p++ - 'A' + 'a');
|
||||
- } else {
|
||||
- *str++ = *p++;
|
||||
- }
|
||||
- }
|
||||
- *str = 0;
|
||||
- } else if (var_len == sizeof("CONTENT_TYPE")-1 &&
|
||||
- memcmp(var, "CONTENT_TYPE", sizeof("CONTENT_TYPE")-1) == 0) {
|
||||
- var = "Content-Type";
|
||||
- } else if (var_len == sizeof("CONTENT_LENGTH")-1 &&
|
||||
- memcmp(var, "CONTENT_LENGTH", sizeof("CONTENT_LENGTH")-1) == 0) {
|
||||
- var = "Content-Length";
|
||||
- } else {
|
||||
- return;
|
||||
- }
|
||||
- add_assoc_stringl_ex(return_value, var, var_len, val, val_len);
|
||||
- if (str) {
|
||||
- free_alloca(var, use_heap);
|
||||
- }
|
||||
-}
|
||||
-/* }}} */
|
||||
-
|
||||
PHP_FUNCTION(apache_request_headers) /* {{{ */
|
||||
{
|
||||
if (zend_parse_parameters_none()) {
|
||||
@@ -1648,7 +1600,7 @@ PHP_FUNCTION(apache_request_headers) /*
|
||||
if (fcgi_is_fastcgi()) {
|
||||
fcgi_request *request = (fcgi_request*) SG(server_context);
|
||||
|
||||
- fcgi_loadenv(request, add_request_header, return_value);
|
||||
+ fcgi_loadenv(request, sapi_add_request_header, return_value);
|
||||
} else {
|
||||
char buf[128];
|
||||
char **env, *p, *q, *var, *val, *t = buf;
|
||||
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
|
||||
index 3256660..e815be4 100644
|
||||
--- a/sapi/fpm/fpm/fpm_main.c
|
||||
+++ b/sapi/fpm/fpm/fpm_main.c
|
||||
@@ -1533,6 +1533,10 @@ PHP_FUNCTION(fastcgi_finish_request) /* {{{ */
|
||||
{
|
||||
fcgi_request *request = (fcgi_request*) SG(server_context);
|
||||
|
||||
+ if (zend_parse_parameters_none() == FAILURE) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if (!fcgi_is_closed(request)) {
|
||||
php_output_end_all();
|
||||
php_header();
|
||||
@@ -1547,8 +1551,27 @@ PHP_FUNCTION(fastcgi_finish_request) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+ZEND_BEGIN_ARG_INFO(cgi_fcgi_sapi_no_arginfo, 0)
|
||||
+ZEND_END_ARG_INFO()
|
||||
+
|
||||
+PHP_FUNCTION(apache_request_headers) /* {{{ */
|
||||
+{
|
||||
+ fcgi_request *request;
|
||||
+
|
||||
+ if (zend_parse_parameters_none() == FAILURE) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ array_init(return_value);
|
||||
+ if ((request = (fcgi_request*) SG(server_context))) {
|
||||
+ fcgi_loadenv(request, sapi_add_request_header, return_value);
|
||||
+ }
|
||||
+} /* }}} */
|
||||
+
|
||||
static const zend_function_entry cgi_fcgi_sapi_functions[] = {
|
||||
- PHP_FE(fastcgi_finish_request, NULL)
|
||||
+ PHP_FE(fastcgi_finish_request, cgi_fcgi_sapi_no_arginfo)
|
||||
+ PHP_FE(apache_request_headers, cgi_fcgi_sapi_no_arginfo)
|
||||
+ PHP_FALIAS(getallheaders, apache_request_headers, cgi_fcgi_sapi_no_arginfo)
|
||||
PHP_FE_END
|
||||
};
|
||||
|
||||
diff --git a/sapi/fpm/tests/getallheaders.phpt b/sapi/fpm/tests/getallheaders.phpt
|
||||
new file mode 100644
|
||||
index 0000000..b41f1c6
|
||||
--- /dev/null
|
||||
+++ b/sapi/fpm/tests/getallheaders.phpt
|
||||
@@ -0,0 +1,67 @@
|
||||
+--TEST--
|
||||
+FPM: Function getallheaders basic test
|
||||
+--SKIPIF--
|
||||
+<?php include "skipif.inc"; ?>
|
||||
+--FILE--
|
||||
+<?php
|
||||
+
|
||||
+require_once "tester.inc";
|
||||
+
|
||||
+$cfg = <<<EOT
|
||||
+[global]
|
||||
+error_log = {{FILE:LOG}}
|
||||
+[unconfined]
|
||||
+listen = {{ADDR}}
|
||||
+pm = dynamic
|
||||
+pm.max_children = 5
|
||||
+pm.start_servers = 1
|
||||
+pm.min_spare_servers = 1
|
||||
+pm.max_spare_servers = 3
|
||||
+EOT;
|
||||
+
|
||||
+$code = <<<EOT
|
||||
+<?php
|
||||
+echo "Test Start\n";
|
||||
+var_dump(getallheaders());
|
||||
+echo "Test End\n";
|
||||
+EOT;
|
||||
+
|
||||
+$headers = [];
|
||||
+$tester = new FPM\Tester($cfg, $code);
|
||||
+$tester->start();
|
||||
+$tester->expectLogStartNotices();
|
||||
+$tester->request(
|
||||
+ '',
|
||||
+ [
|
||||
+ 'HTTP_X_FOO' => 'BAR',
|
||||
+ 'HTTP_FOO' => 'foo'
|
||||
+ ]
|
||||
+ )->expectBody(
|
||||
+ [
|
||||
+ 'Test Start',
|
||||
+ 'array(4) {',
|
||||
+ ' ["Foo"]=>',
|
||||
+ ' string(3) "foo"',
|
||||
+ ' ["X-Foo"]=>',
|
||||
+ ' string(3) "BAR"',
|
||||
+ ' ["Content-Length"]=>',
|
||||
+ ' string(1) "0"',
|
||||
+ ' ["Content-Type"]=>',
|
||||
+ ' string(0) ""',
|
||||
+ '}',
|
||||
+ 'Test End',
|
||||
+ ]
|
||||
+ );
|
||||
+$tester->terminate();
|
||||
+$tester->expectLogTerminatingNotices();
|
||||
+$tester->close();
|
||||
+
|
||||
+?>
|
||||
+Done
|
||||
+--EXPECT--
|
||||
+Done
|
||||
+--CLEAN--
|
||||
+<?php
|
||||
+require_once "tester.inc";
|
||||
+FPM\Tester::clean();
|
||||
+?>
|
||||
--
|
||||
2.1.4
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
diff -up ./ext/date/tests/bug33414-2.phpt.datetests ./ext/date/tests/bug33414-2.phpt
|
||||
--- ./ext/date/tests/bug33414-2.phpt.datetests 2020-04-09 14:06:11.000000000 +0200
|
||||
+++ ./ext/date/tests/bug33414-2.phpt 2020-04-09 14:40:00.809433489 +0200
|
||||
@@ -74,10 +74,10 @@ $strtotime_tstamp = strtotime("next Frid
|
||||
print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";
|
||||
print "wanted=Friday 00:00:00\n\n";
|
||||
?>
|
||||
---EXPECT--
|
||||
+--EXPECTF--
|
||||
TZ=Pacific/Rarotonga - wrong day.
|
||||
-tStamp=Thursday 1970-01-01 17:17:17 -1030 0
|
||||
-result=Tuesday 1970-01-06 00:00:00 -1030 0
|
||||
+tStamp=Thursday 1970-01-01 17:17:17 %s
|
||||
+result=Tuesday 1970-01-06 00:00:00 %s
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=Atlantic/South_Georgia - wrong day.
|
||||
@@ -91,13 +91,13 @@ result=Monday 2005-04-04 00:00:00 EDT 1
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=Pacific/Enderbury - wrong day, off by 2 days.
|
||||
-tStamp=Thursday 1970-01-01 17:17:17 -12 0
|
||||
-result=Monday 1970-01-05 00:00:00 -12 0
|
||||
+tStamp=Thursday 1970-01-01 17:17:17 %s
|
||||
+result=Monday 1970-01-05 00:00:00 %s
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=Pacific/Kiritimati - wrong day, off by 2 days.
|
||||
-tStamp=Thursday 1970-01-01 17:17:17 -1040 0
|
||||
-result=Monday 1970-01-05 00:00:00 -1040 0
|
||||
+tStamp=Thursday 1970-01-01 17:17:17 %s
|
||||
+result=Monday 1970-01-05 00:00:00 %s
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=America/Managua - wrong day.
|
||||
@@ -106,13 +106,13 @@ result=Tuesday 2005-04-12 00:00:00 CDT 1
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=Pacific/Pitcairn - wrong day.
|
||||
-tStamp=Thursday 1970-01-01 17:17:17 -0830 0
|
||||
-result=Wednesday 1970-01-07 00:00:00 -0830 0
|
||||
+tStamp=Thursday 1970-01-01 17:17:17 %s
|
||||
+result=Wednesday 1970-01-07 00:00:00 %s
|
||||
wanted=Wednesday 00:00:00
|
||||
|
||||
TZ=Pacific/Fakaofo - wrong day.
|
||||
-tStamp=Thursday 1970-01-01 17:17:17 -11 0
|
||||
-result=Saturday 1970-01-03 00:00:00 -11 0
|
||||
+tStamp=Thursday 1970-01-01 17:17:17 %s
|
||||
+result=Saturday 1970-01-03 00:00:00 %s
|
||||
wanted=Saturday 00:00:00
|
||||
|
||||
TZ=Pacific/Johnston - wrong day.
|
||||
diff -up ./ext/date/tests/bug66985.phpt.datetests ./ext/date/tests/bug66985.phpt
|
||||
--- ./ext/date/tests/bug66985.phpt.datetests 2020-04-09 14:06:11.000000000 +0200
|
||||
+++ ./ext/date/tests/bug66985.phpt 2020-04-09 14:40:37.099288185 +0200
|
||||
@@ -3,7 +3,7 @@ Bug #66985 (Some timezones are no longer
|
||||
--FILE--
|
||||
<?php
|
||||
$zones = array(
|
||||
- "CST6CDT", "Cuba", "Egypt", "Eire", "EST5EDT", "Factory", "GB-Eire",
|
||||
+ "CST6CDT", "Cuba", "Egypt", "Eire", "EST5EDT", "GB-Eire",
|
||||
"GMT0", "Greenwich", "Hongkong", "Iceland", "Iran", "Israel", "Jamaica",
|
||||
"Japan", "Kwajalein", "Libya", "MST7MDT", "Navajo", "NZ-CHAT", "Poland",
|
||||
"Portugal", "PST8PDT", "Singapore", "Turkey", "Universal", "W-SU",
|
||||
@@ -45,11 +45,6 @@ DateTimeZone Object
|
||||
)
|
||||
DateTimeZone Object
|
||||
(
|
||||
- [timezone_type] => 3
|
||||
- [timezone] => Factory
|
||||
-)
|
||||
-DateTimeZone Object
|
||||
-(
|
||||
[timezone_type] => 3
|
||||
[timezone] => GB-Eire
|
||||
)
|
||||
diff -up ./ext/date/tests/strtotime3-64bit.phpt.datetests ./ext/date/tests/strtotime3-64bit.phpt
|
||||
--- ./ext/date/tests/strtotime3-64bit.phpt.datetests 2020-04-09 14:06:11.000000000 +0200
|
||||
+++ ./ext/date/tests/strtotime3-64bit.phpt 2020-04-09 14:40:00.809433489 +0200
|
||||
@@ -44,7 +44,7 @@ foreach ($strs as $str) {
|
||||
}
|
||||
|
||||
?>
|
||||
---EXPECT--
|
||||
+--EXPECTF--
|
||||
bool(false)
|
||||
bool(false)
|
||||
string(31) "Thu, 15 Jun 2006 00:00:00 +0100"
|
||||
@@ -53,7 +53,7 @@ bool(false)
|
||||
string(31) "Fri, 16 Jun 2006 23:49:12 +0100"
|
||||
bool(false)
|
||||
string(31) "Fri, 16 Jun 2006 02:22:00 +0100"
|
||||
-string(31) "Sun, 16 Jun 0222 02:22:00 -0036"
|
||||
+string(31) "Sun, 16 Jun 0222 02:22:00 %s"
|
||||
string(31) "Fri, 16 Jun 2006 02:22:33 +0100"
|
||||
bool(false)
|
||||
string(31) "Tue, 02 Mar 2004 00:00:00 +0000"
|
|
@ -1,16 +0,0 @@
|
|||
diff -up ./build/gen_stub.php.syslib ./build/gen_stub.php
|
||||
--- ./build/gen_stub.php.syslib 2020-06-25 08:11:51.782046813 +0200
|
||||
+++ ./build/gen_stub.php 2020-06-25 08:13:11.188860368 +0200
|
||||
@@ -1075,6 +1075,12 @@ function initPhpParser() {
|
||||
}
|
||||
|
||||
$isInitialized = true;
|
||||
+
|
||||
+ if (file_exists('/usr/share/php/PhpParser4/autoload.php')) {
|
||||
+ require_once '/usr/share/php/PhpParser4/autoload.php';
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
$version = "4.13.0";
|
||||
$phpParserDir = __DIR__ . "/PHP-Parser-$version";
|
||||
if (!is_dir($phpParserDir)) {
|
|
@ -1,44 +0,0 @@
|
|||
|
||||
Drop "Configure Command" from phpinfo as it doesn't
|
||||
provide any useful information.
|
||||
The available extensions are not related to this command.
|
||||
|
||||
Replace full GCC name by gcc in php -v output
|
||||
|
||||
|
||||
diff -up ./ext/standard/info.c.phpinfo ./ext/standard/info.c
|
||||
--- ./ext/standard/info.c.phpinfo 2020-07-21 10:49:31.000000000 +0200
|
||||
+++ ./ext/standard/info.c 2020-07-21 11:41:56.295633523 +0200
|
||||
@@ -805,9 +805,6 @@ PHPAPI ZEND_COLD void php_print_info(int
|
||||
#ifdef PHP_BUILD_ARCH
|
||||
php_info_print_table_row(2, "Architecture", PHP_BUILD_ARCH);
|
||||
#endif
|
||||
-#ifdef CONFIGURE_COMMAND
|
||||
- php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
|
||||
-#endif
|
||||
|
||||
if (sapi_module.pretty_name) {
|
||||
php_info_print_table_row(2, "Server API", sapi_module.pretty_name );
|
||||
diff -up ./ext/standard/tests/general_functions/phpinfo.phpt.phpinfo ./ext/standard/tests/general_functions/phpinfo.phpt
|
||||
--- ./ext/standard/tests/general_functions/phpinfo.phpt.phpinfo 2020-07-21 10:49:31.000000000 +0200
|
||||
+++ ./ext/standard/tests/general_functions/phpinfo.phpt 2020-07-21 11:41:56.296633522 +0200
|
||||
@@ -17,7 +17,6 @@ PHP Version => %s
|
||||
|
||||
System => %s
|
||||
Build Date => %s%a
|
||||
-Configure Command => %s
|
||||
Server API => Command Line Interface
|
||||
Virtual Directory Support => %s
|
||||
Configuration File (php.ini) Path => %s
|
||||
diff -up ./sapi/cli/php_cli.c.phpinfo ./sapi/cli/php_cli.c
|
||||
--- ./sapi/cli/php_cli.c.phpinfo 2020-07-21 11:43:38.812475300 +0200
|
||||
+++ ./sapi/cli/php_cli.c 2020-07-21 11:43:45.783464540 +0200
|
||||
@@ -645,7 +645,7 @@ static int do_cli(int argc, char **argv)
|
||||
"NTS"
|
||||
#endif
|
||||
#ifdef PHP_BUILD_COMPILER
|
||||
- " " PHP_BUILD_COMPILER
|
||||
+ " gcc"
|
||||
#endif
|
||||
#ifdef PHP_BUILD_ARCH
|
||||
" " PHP_BUILD_ARCH
|
|
@ -1,16 +0,0 @@
|
|||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEEObZBND2MEEsrFG3D+cOdwLlphUQFAmO1tsIACgkQ+cOdwLlp
|
||||
hUQV2xAAm9uAMVqbFlD0ZRMSb3+FAiRXTNB8DKEWcolMpxVTRs50lBp8MlKfpg/X
|
||||
1QtW9KUSQFce6I6lakkbhj3mYJqXPQjkTUHSZhG52gSh8GOPWwEjudjSMyUYmalK
|
||||
wj2kV1dMsmkNgWxjOv30qmZQq4fgjGl1zTKX1Z8wTK4MOakdZwlAy4+vI+y/kfuh
|
||||
oGlLqNthc6m8UUH9lasuZleWyX9CZE+S/6PfgUlAhi6Vov7F6gdh9JawqmOAqIve
|
||||
+TKZ7vGZ/7JV2RYJwUrevgIe+HHaBkOpGmGyI94RULzhQ7q53TP3ihISA77/qwfM
|
||||
YRGJTXSttADndlVql95FjxM44cT9CBlnqFzRGs95hiR3YUlsooD4mTlJXLxzjhZQ
|
||||
QoHFCCXRbeMPl77/qWUNU+xw1qNCcZh2sDyBz+2YOSgFZvWUVJPDmouVNDvIEpC1
|
||||
r+A5aoEVQUG6yw7cv8JjtJ9x+YJRenDa26PjuwJwU5pIFb/slbQi0tYdEvze0Z7A
|
||||
DmwWTkFA9eLVSprQ5xH1wphYtytb7yKhFHs311f+3fgYLqDhbq6fBBnx9dZKfwH4
|
||||
qlS894zKdFRyb2fcH4uocJUXs9AlLuGwfyoyeQcavI2tTDvGsM1WLTTzKEkEuo+Y
|
||||
GzXAqAjyb0l1lFrS5x0cZrYLgvmjd7SoPIonn+Uo1HlWiHOwYbU=
|
||||
=9naU
|
||||
-----END PGP SIGNATURE-----
|
|
@ -1,5 +1,5 @@
|
|||
; Start a new pool named 'www'.
|
||||
; the variable $pool can be used in any directive and will be replaced by the
|
||||
; the variable $pool can we used in any directive and will be replaced by the
|
||||
; pool name ('www' here)
|
||||
[www]
|
||||
|
||||
|
@ -128,7 +128,7 @@ pm.min_spare_servers = 5
|
|||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.max_spare_servers = 35
|
||||
|
||||
|
||||
; The number of seconds after which an idle process will be killed.
|
||||
; Note: Used only when pm is set to 'ondemand'
|
||||
; Default Value: 10s
|
||||
|
@ -238,7 +238,7 @@ pm.max_spare_servers = 35
|
|||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
;pm.status_path = /status
|
||||
|
||||
|
||||
; The ping URI to call the monitoring page of FPM. If this value is not set, no
|
||||
; URI will be recognized as a ping page. This could be used to test from outside
|
||||
; that FPM is alive and responding, or to
|
||||
|
@ -255,7 +255,7 @@ pm.max_spare_servers = 35
|
|||
; response is formatted as text/plain with a 200 response code.
|
||||
; Default Value: pong
|
||||
;ping.response = pong
|
||||
|
||||
|
||||
; The access log file
|
||||
; Default: not set
|
||||
;access.log = log/$pool.access.log
|
||||
|
@ -330,26 +330,22 @@ slowlog = /var/log/php-fpm/www-slow.log
|
|||
; Default Value: 0
|
||||
;request_slowlog_timeout = 0
|
||||
|
||||
; Depth of slow log stack trace.
|
||||
; Default Value: 20
|
||||
;request_slowlog_trace_depth = 20
|
||||
|
||||
; The timeout for serving a single request after which the worker process will
|
||||
; be killed. This option should be used when the 'max_execution_time' ini option
|
||||
; does not stop script execution for some reason. A value of '0' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_terminate_timeout = 0
|
||||
|
||||
|
||||
; Set open file descriptor rlimit.
|
||||
; Default Value: system defined value
|
||||
;rlimit_files = 1024
|
||||
|
||||
|
||||
; Set max core size rlimit.
|
||||
; Possible Values: 'unlimited' or an integer greater or equal to 0
|
||||
; Default Value: system defined value
|
||||
;rlimit_core = 0
|
||||
|
||||
|
||||
; Chroot to this directory at the start. This value must be defined as an
|
||||
; absolute path. When this value is not set, chroot is not used.
|
||||
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
|
||||
|
@ -359,20 +355,20 @@ slowlog = /var/log/php-fpm/www-slow.log
|
|||
; possible. However, all PHP paths will be relative to the chroot
|
||||
; (error_log, sessions.save_path, ...).
|
||||
; Default Value: not set
|
||||
;chroot =
|
||||
|
||||
;chroot =
|
||||
|
||||
; Chdir to this directory at the start.
|
||||
; Note: relative path can be used.
|
||||
; Default Value: current directory or / when chroot
|
||||
;chdir = /var/www
|
||||
|
||||
|
||||
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||
; stderr will be redirected to /dev/null according to FastCGI specs.
|
||||
; Note: on highloaded environement, this can cause some delay in the page
|
||||
; process time (several ms).
|
||||
; Default Value: no
|
||||
;catch_workers_output = yes
|
||||
|
||||
|
||||
; Clear environment in FPM workers
|
||||
; Prevents arbitrary environment variables from reaching FPM worker processes
|
||||
; by clearing the environment in workers before env vars specified in this
|
||||
|
@ -385,7 +381,7 @@ slowlog = /var/log/php-fpm/www-slow.log
|
|||
; Limits the extensions of the main script FPM will allow to parse. This can
|
||||
; prevent configuration mistakes on the web server side. You should only limit
|
||||
; FPM to .php extensions to prevent malicious users to use other extensions to
|
||||
; execute php code.
|
||||
; exectute php code.
|
||||
; Note: set an empty value to allow all extensions.
|
||||
; Default Value: .php
|
||||
;security.limit_extensions = .php .php3 .php4 .php5 .php7
|
||||
|
@ -403,7 +399,7 @@ slowlog = /var/log/php-fpm/www-slow.log
|
|||
; overwrite the values previously defined in the php.ini. The directives are the
|
||||
; same as the PHP SAPI:
|
||||
; php_value/php_flag - you can set classic ini defines which can
|
||||
; be overwritten from PHP call 'ini_set'.
|
||||
; be overwritten from PHP call 'ini_set'.
|
||||
; php_admin_value/php_admin_flag - these directives won't be overwritten by
|
||||
; PHP call 'ini_set'
|
||||
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
|
||||
|
|
|
@ -43,24 +43,6 @@ error_log = /var/log/php-fpm/error.log
|
|||
; Default Value: notice
|
||||
;log_level = notice
|
||||
|
||||
; Log limit on number of characters in the single line (log entry). If the
|
||||
; line is over the limit, it is wrapped on multiple lines. The limit is for
|
||||
; all logged characters including message prefix and suffix if present. However
|
||||
; the new line character does not count into it as it is present only when
|
||||
; logging to a file descriptor. It means the new line character is not present
|
||||
; when logging to syslog.
|
||||
; Default Value: 1024
|
||||
;log_limit = 4096
|
||||
|
||||
; Log buffering specifies if the log line is buffered which means that the
|
||||
; line is written in a single write operation. If the value is false, then the
|
||||
; data is written directly into the file descriptor. It is an experimental
|
||||
; option that can potentionaly improve logging performance and memory usage
|
||||
; for some heavy logging scenarios. This option is ignored if logging to syslog
|
||||
; as it has to be always buffered.
|
||||
; Default value: yes
|
||||
;log_buffering = no
|
||||
|
||||
; If this number of child processes exit with SIGSEGV or SIGBUS within the time
|
||||
; interval set by emergency_restart_interval then FPM will restart. A value
|
||||
; of '0' means 'Off'.
|
||||
|
|
|
@ -19,13 +19,15 @@ DirectoryIndex index.php
|
|||
#
|
||||
# Redirect to local php-fpm (no mod_php in default configuration)
|
||||
#
|
||||
<IfModule !mod_php.c>
|
||||
<IfModule !mod_php5.c>
|
||||
<IfModule !mod_php7.c>
|
||||
# Enable http authorization headers
|
||||
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
|
||||
|
||||
<FilesMatch \.(php|phar)$>
|
||||
SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
#
|
||||
|
@ -34,7 +36,7 @@ DirectoryIndex index.php
|
|||
#
|
||||
# mod_php options
|
||||
#
|
||||
<IfModule mod_php.c>
|
||||
<IfModule mod_php7.c>
|
||||
#
|
||||
# Cause the PHP interpreter to handle files with a .php extension.
|
||||
#
|
||||
|
|
678
SOURCES/php.ini
678
SOURCES/php.ini
File diff suppressed because it is too large
Load Diff
|
@ -3,11 +3,10 @@
|
|||
# easy for developers to write dynamically generated webpages.
|
||||
#
|
||||
|
||||
# Cannot load both php5, php7 and php modules
|
||||
# Cannot load both php5 and php7 modules
|
||||
<IfModule !mod_php5.c>
|
||||
<IfModule !mod_php7.c>
|
||||
<IfModule prefork.c>
|
||||
LoadModule php_module modules/libphp.so
|
||||
</IfModule>
|
||||
<IfModule prefork.c>
|
||||
LoadModule php7_module modules/libphp7.so
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
<IfModule !mod_php5.c>
|
||||
<IfModule !prefork.c>
|
||||
# ZTS module is not supported, so FPM is preferred
|
||||
# LoadModule php7_module modules/libphp7-zts.so
|
||||
</IfModule>
|
||||
</IfModule>
|
1207
SPECS/php.spec
1207
SPECS/php.spec
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue