This commit is contained in:
Sergey Zhemoytel 2025-02-05 21:23:16 +00:00
parent a886a74670
commit da9eb96a77
20 changed files with 5402 additions and 124 deletions

View file

@ -1,2 +1,2 @@
sources: sources:
php-7.3.0RC6.tar.xz: b6396dea2a03b1e59f94d2c0e3becb00ee40122c php-7.4.33.tar.gz: 7c29812c51880390b74a5b23f0afe61e3b374645

View file

@ -0,0 +1,433 @@
From 37c1f7580dda6d5c6022d97d861b97530cfb8cde Mon Sep 17 00:00:00 2001
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Date: Tue, 16 Jan 2024 12:52:30 +0300
Subject: [PATCH] Revert "Throw notice on array access on illegal type"
This reverts commit c42b7dd6d32b43304b76452add158a2ef325d494
https://github.com/php/php-src/commit/c42b7dd6d32b43304
That commit causes a crash on the following input:
$ echo "Uwo8P1RUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRU
VFRUVFQAAAAmIyRiYQoBJMhjW3JbWxAAGiYjJGJhCgEkyGNbcltbEABdXV1dPSR1cltbEAAaw11d
XV09JHWQk3I/Pg==" | base64 -d > input8
$ php input8
php 7.4.x segfaults. The problem is in trying to access is_list.
With this revert, exit code is 0, but php 8.0.0+ more correctly gives an error about invalid input.
---
UPGRADING | 4 ----
Zend/tests/024.phpt | 14 ++++--------
Zend/tests/033.phpt | 30 --------------------------
Zend/tests/assign_to_var_003.phpt | 3 +--
Zend/tests/call_user_func_007.phpt | 2 --
Zend/tests/dereference_002.phpt | 2 --
Zend/tests/dereference_010.phpt | 3 ---
Zend/tests/dereference_014.phpt | 4 ----
Zend/tests/isset_003.phpt | 2 --
Zend/tests/offset_bool.phpt | 19 +---------------
Zend/tests/offset_long.phpt | 19 +---------------
Zend/tests/offset_null.phpt | 19 +---------------
Zend/zend_execute.c | 6 +-----
ext/spl/tests/array_026.phpt | 6 ++----
ext/spl/tests/bug62978.phpt | 2 --
ext/standard/tests/array/bug31158.phpt | 2 --
tests/lang/bug25922.phpt | 1 -
tests/lang/passByReference_003.phpt | 6 ++----
18 files changed, 13 insertions(+), 131 deletions(-)
diff --git a/UPGRADING b/UPGRADING
index 354e4fac02..44546f4572 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -22,10 +22,6 @@ PHP 7.4 UPGRADE NOTES
========================================
- Core:
- . Trying to use values of type null, bool, int, float or resource as an
- array (such as $null["key"]) will now generate a notice. This does not
- affect array accesses performed by list().
- RFC: https://wiki.php.net/rfc/notice-for-non-valid-array-container
. get_declared_classes() no longer returns anonymous classes that haven't
been instantiated yet.
. "fn" is now a reserved keyword. In particular, it can no longer be used as a
diff --git a/Zend/tests/024.phpt b/Zend/tests/024.phpt
index 9e647d4231..34dac0f1e3 100644
--- a/Zend/tests/024.phpt
+++ b/Zend/tests/024.phpt
@@ -16,23 +16,19 @@ var_dump($a->$b->{$c[1]});
?>
--EXPECTF--
Notice: Undefined variable: a in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
NULL
-Notice: Undefined variable: a in %s on line %d
-
-Notice: Undefined variable: c in %s on line %d
+Notice: Undefined variable: %s in %s on line %d
-Notice: Trying to access array offset on value of type null in %s on line %d
+Notice: Undefined variable: %s in %s on line %d
NULL
Notice: Undefined variable: a in %s on line %d
int(1)
-Notice: Undefined variable: a in %s on line %d
+Notice: Undefined variable: %s in %s on line %d
-Notice: Undefined variable: b in %s on line %d
+Notice: Undefined variable: %s in %s on line %d
int(0)
Notice: Undefined variable: a in %s on line %d
@@ -49,8 +45,6 @@ NULL
Notice: Undefined variable: c in %s on line %d
-Notice: Trying to access array offset on value of type null in %s on line %d
-
Notice: Trying to get property '1' of non-object in %s on line %d
Notice: Trying to get property '' of non-object in %s on line %d
diff --git a/Zend/tests/033.phpt b/Zend/tests/033.phpt
index 1e7fca1e0d..a76a322ccf 100644
--- a/Zend/tests/033.phpt
+++ b/Zend/tests/033.phpt
@@ -19,40 +19,10 @@ $arr[][]->bar = 2;
--EXPECTF--
Notice: Undefined variable: arr in %s on line %d
-Notice: Trying to access array offset on value of type null in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
-
Notice: Undefined variable: arr in %s on line %d
-Notice: Trying to access array offset on value of type null in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
-
Notice: Undefined variable: arr in %s on line %d
-Notice: Trying to access array offset on value of type null in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
-
Notice: Trying to get property 'foo' of non-object in %s on line %d
Warning: Creating default object from empty value in %s on line %d
diff --git a/Zend/tests/assign_to_var_003.phpt b/Zend/tests/assign_to_var_003.phpt
index bbe1b372bb..b915c7231e 100644
--- a/Zend/tests/assign_to_var_003.phpt
+++ b/Zend/tests/assign_to_var_003.phpt
@@ -12,8 +12,7 @@ var_dump($var1);
echo "Done\n";
?>
---EXPECTF--
-Notice: Trying to access array offset on value of type float in %s on line %d
+--EXPECT--
NULL
NULL
Done
diff --git a/Zend/tests/call_user_func_007.phpt b/Zend/tests/call_user_func_007.phpt
index ed44320c3f..f73f14b1ff 100644
--- a/Zend/tests/call_user_func_007.phpt
+++ b/Zend/tests/call_user_func_007.phpt
@@ -13,8 +13,6 @@ var_dump($a);
--EXPECTF--
Notice: Undefined offset: 0 in %s on line %d
-Notice: Trying to access array offset on value of type null in %s on line %d
-
Warning: Parameter 1 to foo() expected to be a reference, value given in %s on line %d
array(0) {
}
diff --git a/Zend/tests/dereference_002.phpt b/Zend/tests/dereference_002.phpt
index 7290df7714..d16e1bb483 100644
--- a/Zend/tests/dereference_002.phpt
+++ b/Zend/tests/dereference_002.phpt
@@ -69,8 +69,6 @@ array(2) {
int(5)
}
int(1)
-
-Notice: Trying to access array offset on value of type int in %s on line %d
NULL
Notice: Undefined offset: 4 in %s on line %d
diff --git a/Zend/tests/dereference_010.phpt b/Zend/tests/dereference_010.phpt
index c63f6acaf9..981fe31160 100644
--- a/Zend/tests/dereference_010.phpt
+++ b/Zend/tests/dereference_010.phpt
@@ -21,10 +21,7 @@ var_dump(b()[1]);
?>
--EXPECTF--
-Notice: Trying to access array offset on value of type int in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type int in %s on line %d
NULL
Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d
diff --git a/Zend/tests/dereference_014.phpt b/Zend/tests/dereference_014.phpt
index 189dca7a38..f8910dd016 100644
--- a/Zend/tests/dereference_014.phpt
+++ b/Zend/tests/dereference_014.phpt
@@ -27,12 +27,8 @@ var_dump($h);
?>
--EXPECTF--
-Notice: Trying to access array offset on value of type null in %s on line %d
-
Notice: Trying to get property 'a' of non-object in %s on line %d
NULL
-Notice: Trying to access array offset on value of type null in %s on line %d
-
Notice: Trying to get property 'b' of non-object in %s on line %d
NULL
diff --git a/Zend/tests/isset_003.phpt b/Zend/tests/isset_003.phpt
index 06cbe3d51d..eac72f7e0a 100644
--- a/Zend/tests/isset_003.phpt
+++ b/Zend/tests/isset_003.phpt
@@ -33,8 +33,6 @@ Notice: Undefined variable: c in %s on line %d
Notice: Undefined variable: d in %s on line %d
-Notice: Trying to access array offset on value of type null in %s on line %d
-
Notice: Trying to get property '' of non-object in %s on line %d
bool(false)
bool(true)
diff --git a/Zend/tests/offset_bool.phpt b/Zend/tests/offset_bool.phpt
index 8ed9f28e43..a08dd5450c 100644
--- a/Zend/tests/offset_bool.phpt
+++ b/Zend/tests/offset_bool.phpt
@@ -24,31 +24,14 @@ var_dump($bool[$arr]);
echo "Done\n";
?>
---EXPECTF--
-Notice: Trying to access array offset on value of type bool in %s on line %d
+--EXPECT--
NULL
-
-Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
Done
diff --git a/Zend/tests/offset_long.phpt b/Zend/tests/offset_long.phpt
index 4c6b3972d2..98b9b0f08b 100644
--- a/Zend/tests/offset_long.phpt
+++ b/Zend/tests/offset_long.phpt
@@ -24,31 +24,14 @@ var_dump($long[$arr]);
echo "Done\n";
?>
---EXPECTF--
-Notice: Trying to access array offset on value of type int in %s on line %d
+--EXPECT--
NULL
-
-Notice: Trying to access array offset on value of type int in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type int in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type int in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type int in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type int in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type int in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type int in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type int in %s on line %d
NULL
Done
diff --git a/Zend/tests/offset_null.phpt b/Zend/tests/offset_null.phpt
index ad0b1f3049..c6ad6561db 100644
--- a/Zend/tests/offset_null.phpt
+++ b/Zend/tests/offset_null.phpt
@@ -24,31 +24,14 @@ var_dump($null[$arr]);
echo "Done\n";
?>
---EXPECTF--
-Notice: Trying to access array offset on value of type null in %s on line %d
+--EXPECT--
NULL
-
-Notice: Trying to access array offset on value of type null in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type null in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type null in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type null in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type null in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type null in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type null in %s on line %d
NULL
-
-Notice: Trying to access array offset on value of type null in %s on line %d
NULL
Done
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 35cf24e586..7bc2248aa3 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -2479,15 +2479,11 @@ try_string_offset:
}
} else {
if (type != BP_VAR_IS && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
- container = ZVAL_UNDEFINED_OP1();
+ ZVAL_UNDEFINED_OP1();
}
if (ZEND_CONST_COND(dim_type == IS_CV, 1) && UNEXPECTED(Z_TYPE_P(dim) == IS_UNDEF)) {
ZVAL_UNDEFINED_OP2();
}
- if (!is_list && type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to access array offset on value of type %s",
- zend_zval_type_name(container));
- }
ZVAL_NULL(result);
}
}
diff --git a/ext/spl/tests/array_026.phpt b/ext/spl/tests/array_026.phpt
index 8ff6aafb93..9c79c57b66 100644
--- a/ext/spl/tests/array_026.phpt
+++ b/ext/spl/tests/array_026.phpt
@@ -8,10 +8,8 @@ $test['d1']['d3'] = 'world';
var_dump($test, $test3['mmmmm']);
?>
--EXPECTF--
-Notice: Undefined variable: test3 in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
-object(ArrayObject)#1 (1) {
+Notice: Undefined variable: test3 in %s%earray_026.php on line %d
+object(ArrayObject)#%d (1) {
["storage":"ArrayObject":private]=>
array(1) {
["d1"]=>
diff --git a/ext/spl/tests/bug62978.phpt b/ext/spl/tests/bug62978.phpt
index 972bd07ce1..5c55507ad9 100644
--- a/ext/spl/tests/bug62978.phpt
+++ b/ext/spl/tests/bug62978.phpt
@@ -32,8 +32,6 @@ Notice: Undefined index: epic_magic in %sbug62978.php on line %d
NULL
Notice: Undefined variable: c in %sbug62978.php on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
NULL
Notice: Undefined index: epic_magic in %sbug62978.php on line %d
diff --git a/ext/standard/tests/array/bug31158.phpt b/ext/standard/tests/array/bug31158.phpt
index 62ba1cfaa3..d9e65bdde9 100644
--- a/ext/standard/tests/array/bug31158.phpt
+++ b/ext/standard/tests/array/bug31158.phpt
@@ -15,6 +15,4 @@ echo "ok\n";
?>
--EXPECTF--
Notice: Undefined variable: GLOBALS in %sbug31158.php on line 6
-
-Notice: Trying to access array offset on value of type null in %sbug31158.php on line 6
ok
diff --git a/tests/lang/bug25922.phpt b/tests/lang/bug25922.phpt
index 796ef6df82..41fb135e03 100644
--- a/tests/lang/bug25922.phpt
+++ b/tests/lang/bug25922.phpt
@@ -20,5 +20,4 @@ test();
?>
--EXPECT--
Undefined variable: data
-Trying to access array offset on value of type null
Undefined index here: ''
diff --git a/tests/lang/passByReference_003.phpt b/tests/lang/passByReference_003.phpt
index ad9e1e39de..be002031d7 100644
--- a/tests/lang/passByReference_003.phpt
+++ b/tests/lang/passByReference_003.phpt
@@ -25,16 +25,14 @@ var_dump($undef2)
--EXPECTF--
Passing undefined by value
-Notice: Undefined variable: undef1 in %s on line %d
-
-Notice: Trying to access array offset on value of type null in %s on line %d
+Notice: Undefined variable: undef1 in %s on line 13
Inside passbyVal call:
NULL
After call
-Notice: Undefined variable: undef1 in %s on line %d
+Notice: Undefined variable: undef1 in %s on line 15
NULL
Passing undefined by reference
--
2.40.1

30
CVE-2022-4900.patch Normal file
View file

@ -0,0 +1,30 @@
# from https://github.com/php/php-src/commit/789a37f14405e2d1a05a76c9fb4ed2d49d4580d5#diff-0265438340ea11a73f2e268834e3ac37b52342d9a911b5c4193df0b0072895ecR2389
diff -ruN a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
--- a/sapi/cli/php_cli_server.c 2022-10-31 19:36:05.000000000 +0900
+++ b/sapi/cli/php_cli_server.c 2024-11-28 11:05:56.301504326 +0900
@@ -517,13 +517,8 @@
if (php_cli_server_workers_max > 1) {
zend_long php_cli_server_worker;
- php_cli_server_workers = calloc(
- php_cli_server_workers_max, sizeof(pid_t));
- if (!php_cli_server_workers) {
- php_cli_server_workers_max = 1;
-
- return SUCCESS;
- }
+ php_cli_server_workers = pecalloc(
+ php_cli_server_workers_max, sizeof(pid_t), 1);
php_cli_server_master = getpid();
@@ -2361,7 +2356,7 @@
!WIFSIGNALED(php_cli_server_worker_status));
}
- free(php_cli_server_workers);
+ pefree(php_cli_server_workers, 1);
}
#endif
} /* }}} */

12
fix-include-e2k.patch Normal file
View file

@ -0,0 +1,12 @@
diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c
index 53efa865..d6975a44 100644
--- a/ext/opcache/zend_accelerator_util_funcs.c
+++ b/ext/opcache/zend_accelerator_util_funcs.c
@@ -24,6 +24,7 @@
#include "zend_accelerator_util_funcs.h"
#include "zend_persist.h"
#include "zend_shared_alloc.h"
+#include <immintrin.h>
#if SIZEOF_SIZE_T <= SIZEOF_ZEND_LONG
/* If sizeof(void*) == sizeof(zend_ulong) we can use zend_hash index functions */

18
macros.php Normal file
View file

@ -0,0 +1,18 @@
#
# Interface versions exposed by PHP:
#
%php_core_api @PHP_APIVER@
%php_zend_api @PHP_ZENDVER@
%php_pdo_api @PHP_PDOVER@
%php_version @PHP_VERSION@
# Compatibility, drop when nobody uses it
%php_api @PHP_ZENDVER@
%php_extdir %{_libdir}/php/modules
%php_inidir %{_sysconfdir}/php.d
%php_incldir %{_includedir}/php
%__php %{_bindir}/php

View file

@ -1,5 +1,6 @@
--- php-7.0.1/sapi/fpm/php-fpm.conf.in.fpmmdv.droplet 2015-12-16 11:41:54.000000000 +0100 diff -up php-7.4.1/sapi/fpm/php-fpm.conf.in.fpmmdv.droplet php-7.4.1/sapi/fpm/php-fpm.conf.in
+++ php-7.0.1/sapi/fpm/php-fpm.conf.in 2015-12-29 00:32:32.641437818 +0100 --- php-7.4.1/sapi/fpm/php-fpm.conf.in.fpmmdv.droplet 2019-12-17 17:35:58.000000000 +0100
+++ php-7.4.1/sapi/fpm/php-fpm.conf.in 2020-01-08 22:22:54.634218365 +0100
@@ -14,14 +14,14 @@ @@ -14,14 +14,14 @@
; Pid file ; Pid file
; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
@ -17,8 +18,9 @@
; syslog_facility is used to specify what type of program is logging the ; syslog_facility is used to specify what type of program is logging the
; message. This lets syslogd specify that messages from different facilities ; message. This lets syslogd specify that messages from different facilities
--- php-7.0.1/sapi/fpm/www.conf.in.fpmmdv.droplet 2015-12-29 00:33:15.685147449 +0100 diff -up php-7.4.1/sapi/fpm/www.conf.in.fpmmdv.droplet php-7.4.1/sapi/fpm/www.conf.in
+++ php-7.0.1/sapi/fpm/www.conf.in 2015-12-29 00:34:56.491559636 +0100 --- php-7.4.1/sapi/fpm/www.conf.in.fpmmdv.droplet 2019-12-17 17:35:58.000000000 +0100
+++ php-7.4.1/sapi/fpm/www.conf.in 2020-01-08 22:23:54.016215484 +0100
@@ -33,7 +33,7 @@ group = @php_fpm_group@ @@ -33,7 +33,7 @@ group = @php_fpm_group@
; (IPv6 and IPv4-mapped) on a specific port; ; (IPv6 and IPv4-mapped) on a specific port;
; '/path/to/unix/socket' - to listen on a unix socket. ; '/path/to/unix/socket' - to listen on a unix socket.
@ -28,7 +30,7 @@
; Set listen(2) backlog. ; Set listen(2) backlog.
; Default Value: 511 (-1 on FreeBSD and OpenBSD) ; Default Value: 511 (-1 on FreeBSD and OpenBSD)
@@ -104,22 +104,22 @@ pm = dynamic @@ -110,22 +110,22 @@ pm = dynamic
; forget to tweak pm.* to fit your needs. ; forget to tweak pm.* to fit your needs.
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
; Note: This value is mandatory. ; Note: This value is mandatory.
@ -37,7 +39,7 @@
; The number of child processes created on startup. ; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic' ; Note: Used only when pm is set to 'dynamic'
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 ; Default Value: (min_spare_servers + max_spare_servers) / 2
-pm.start_servers = 2 -pm.start_servers = 2
+pm.start_servers = 20 +pm.start_servers = 20
@ -55,7 +57,7 @@
; The number of seconds after which an idle process will be killed. ; The number of seconds after which an idle process will be killed.
; Note: Used only when pm is set to 'ondemand' ; Note: Used only when pm is set to 'ondemand'
@@ -130,7 +130,7 @@ pm.max_spare_servers = 3 @@ -136,7 +136,7 @@ pm.max_spare_servers = 3
; This can be useful to work around memory leaks in 3rd party libraries. For ; This can be useful to work around memory leaks in 3rd party libraries. For
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default Value: 0 ; Default Value: 0
@ -64,7 +66,7 @@
; The URI to view the FPM status page. If this value is not set, no URI will be ; The URI to view the FPM status page. If this value is not set, no URI will be
; recognized as a status page. It shows the following informations: ; recognized as a status page. It shows the following informations:
@@ -314,7 +314,7 @@ pm.max_spare_servers = 3 @@ -320,7 +320,7 @@ pm.max_spare_servers = 3
; The log file for slow requests ; The log file for slow requests
; Default Value: not set ; Default Value: not set
; Note: slowlog is mandatory if request_slowlog_timeout is set ; Note: slowlog is mandatory if request_slowlog_timeout is set
@ -73,7 +75,7 @@
; The timeout for serving a single request after which a PHP backtrace will be ; The timeout for serving a single request after which a PHP backtrace will be
; dumped to the 'slowlog' file. A value of '0s' means 'off'. ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
@@ -386,6 +386,7 @@ pm.max_spare_servers = 3 @@ -411,6 +411,7 @@ pm.max_spare_servers = 3
;env[TMP] = /tmp ;env[TMP] = /tmp
;env[TMPDIR] = /tmp ;env[TMPDIR] = /tmp
;env[TEMP] = /tmp ;env[TEMP] = /tmp

View file

@ -4,8 +4,8 @@
BUILD_FPM="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_FASTCGI_OBJS:.lo=.o) \$(PHP_FPM_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)" BUILD_FPM="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_FASTCGI_OBJS:.lo=.o) \$(PHP_FPM_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
;; ;;
*) *)
- BUILD_FPM="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_FPM_OBJS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)" - BUILD_FPM="\$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_FPM_OBJS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
+ BUILD_FPM="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) libphp\$(PHP_MAJOR_VERSION)_common.la \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_FPM_OBJS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)" + BUILD_FPM="\$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) libphp\$(PHP_MAJOR_VERSION)_common.la \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_FPM_OBJS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
;; ;;
esac esac

View file

@ -1,83 +1,8 @@
--- php-7.2.0/ext/date/php_date.c.omv~ 2017-11-29 13:24:17.183364915 +0100 diff --git a/Zend/zend_signal.c b/Zend/zend_signal.c
+++ php-7.2.0/ext/date/php_date.c 2017-11-29 13:24:28.970391388 +0100 index e6991475..1fbd59f6 100644
@@ -664,7 +664,7 @@ static zval *date_period_read_property(z --- a/Zend/zend_signal.c
static void date_period_write_property(zval *object, zval *member, zval *value, void **cache_slot); +++ b/Zend/zend_signal.c
@@ -386,7 +386,7 @@ static void zend_signal_globals_ctor(zend_signal_globals_t *zend_signal_globals)
/* {{{ Module struct */
-zend_module_entry date_module_entry = {
+__attribute__((visibility("default"))) zend_module_entry date_module_entry = {
STANDARD_MODULE_HEADER_EX,
NULL,
NULL,
--- php-7.2.0/ext/libxml/libxml.c.omv~ 2017-11-29 13:29:29.380067310 +0100
+++ php-7.2.0/ext/libxml/libxml.c 2017-11-29 13:29:45.521103681 +0100
@@ -135,7 +135,7 @@ static const zend_function_entry libxml_
PHP_FE_END
};
-zend_module_entry libxml_module_entry = {
+__attribute__((visibility("default"))) zend_module_entry libxml_module_entry = {
STANDARD_MODULE_HEADER,
"libxml", /* extension name */
libxml_functions, /* extension function list */
--- php-7.2.0/ext/pcre/php_pcre.c.omv~ 2017-11-29 13:29:59.452135074 +0100
+++ php-7.2.0/ext/pcre/php_pcre.c 2017-11-29 13:30:04.050145437 +0100
@@ -2715,7 +2715,7 @@ static const zend_function_entry pcre_fu
PHP_FE_END
};
-zend_module_entry pcre_module_entry = {
+__attribute__((visibility("default"))) zend_module_entry pcre_module_entry = {
STANDARD_MODULE_HEADER,
"pcre",
pcre_functions,
--- php-7.2.0/ext/reflection/php_reflection.c.omv~ 2017-11-29 13:30:13.372166447 +0100
+++ php-7.2.0/ext/reflection/php_reflection.c 2017-11-29 13:30:34.731214591 +0100
@@ -6830,7 +6830,7 @@ PHP_MINFO_FUNCTION(reflection) /* {{{ */
php_info_print_table_end();
} /* }}} */
-zend_module_entry reflection_module_entry = { /* {{{ */
+__attribute__((visibility("default"))) zend_module_entry reflection_module_entry = { /* {{{ */
STANDARD_MODULE_HEADER,
"Reflection",
reflection_ext_functions,
--- php-7.2.0/ext/simplexml/simplexml.c.omv~ 2017-11-29 13:31:10.373294945 +0100
+++ php-7.2.0/ext/simplexml/simplexml.c 2017-11-29 13:31:14.562304390 +0100
@@ -2676,7 +2676,7 @@ static const zend_module_dep simplexml_d
};
/* }}} */
-zend_module_entry simplexml_module_entry = { /* {{{ */
+__attribute__((visibility("default"))) zend_module_entry simplexml_module_entry = { /* {{{ */
STANDARD_MODULE_HEADER_EX, NULL,
simplexml_deps,
"SimpleXML",
--- php-7.2.0/ext/spl/php_spl.c.omv~ 2017-11-29 13:30:51.564252538 +0100
+++ php-7.2.0/ext/spl/php_spl.c 2017-11-29 13:31:00.361272372 +0100
@@ -1015,7 +1015,7 @@ PHP_RSHUTDOWN_FUNCTION(spl) /* {{{ */
/* {{{ spl_module_entry
*/
-zend_module_entry spl_module_entry = {
+__attribute__((visibility("default"))) zend_module_entry spl_module_entry = {
STANDARD_MODULE_HEADER,
"SPL",
spl_functions,
--- php-7.2.0/ext/standard/basic_functions.c.omv~ 2017-11-29 13:31:35.333351228 +0100
+++ php-7.2.0/ext/standard/basic_functions.c 2017-11-29 13:31:39.891361507 +0100
@@ -3422,7 +3422,7 @@ static const zend_module_dep standard_de
};
/* }}} */
-zend_module_entry basic_functions_module = { /* {{{ */
+__attribute__((visibility("default"))) zend_module_entry basic_functions_module = { /* {{{ */
STANDARD_MODULE_HEADER_EX,
NULL,
standard_deps,
--- php-7.2.0/Zend/zend_signal.c.omv~ 2017-11-29 13:31:58.788404124 +0100
+++ php-7.2.0/Zend/zend_signal.c 2017-11-29 13:32:19.265450309 +0100
@@ -377,7 +377,7 @@ static void zend_signal_globals_ctor(zen
} }
/* }}} */ /* }}} */
@ -86,12 +11,103 @@
{ {
int signo; int signo;
struct sigaction sa; struct sigaction sa;
@@ -399,7 +399,7 @@ void zend_signal_init(void) /* {{{ */ @@ -408,7 +408,7 @@ void zend_signal_init(void) /* {{{ */
/* {{{ zend_signal_startup /* {{{ zend_signal_startup
* alloc zend signal globals */ * alloc zend signal globals */
-void zend_signal_startup(void) -ZEND_API void zend_signal_startup(void)
+__attribute__((visibility("default"))) void zend_signal_startup(void) +__attribute__((visibility("default"))) ZEND_API void zend_signal_startup(void)
{ {
#ifdef ZTS #ifdef ZTS
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 02068b44..e7883b32 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -683,7 +683,7 @@ static zval *date_period_get_property_ptr_ptr(zval *object, zval *member, int ty
static int date_object_compare_timezone(zval *tz1, zval *tz2);
/* {{{ Module struct */
-zend_module_entry date_module_entry = {
+__attribute__((visibility("default"))) zend_module_entry date_module_entry = {
STANDARD_MODULE_HEADER_EX,
NULL,
NULL,
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index c024e166..926708dc 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -130,7 +130,7 @@ static const zend_function_entry libxml_functions[] = {
PHP_FE_END
};
-zend_module_entry libxml_module_entry = {
+__attribute__((visibility("default"))) zend_module_entry libxml_module_entry = {
STANDARD_MODULE_HEADER,
"libxml", /* extension name */
libxml_functions, /* extension function list */
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 39896bb0..9d7c7d12 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -3058,7 +3058,7 @@ static const zend_function_entry pcre_functions[] = {
PHP_FE_END
};
-zend_module_entry pcre_module_entry = {
+__attribute__((visibility("default"))) zend_module_entry pcre_module_entry = {
STANDARD_MODULE_HEADER,
"pcre",
pcre_functions,
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index f62dd15e..78638d9c 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -6946,7 +6946,7 @@ PHP_MINFO_FUNCTION(reflection) /* {{{ */
php_info_print_table_end();
} /* }}} */
-zend_module_entry reflection_module_entry = { /* {{{ */
+__attribute__((visibility("default"))) zend_module_entry reflection_module_entry = { /* {{{ */
STANDARD_MODULE_HEADER,
"Reflection",
reflection_ext_functions,
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 6394d491..dc21dc11 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -2661,7 +2661,7 @@ static const zend_module_dep simplexml_deps[] = { /* {{{ */
};
/* }}} */
-zend_module_entry simplexml_module_entry = { /* {{{ */
+__attribute__((visibility("default"))) zend_module_entry simplexml_module_entry = { /* {{{ */
STANDARD_MODULE_HEADER_EX, NULL,
simplexml_deps,
"SimpleXML",
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index b147a961..2e1e551d 100644
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -1042,7 +1042,7 @@ PHP_RSHUTDOWN_FUNCTION(spl) /* {{{ */
/* {{{ spl_module_entry
*/
-zend_module_entry spl_module_entry = {
+__attribute__((visibility("default"))) zend_module_entry spl_module_entry = {
STANDARD_MODULE_HEADER,
"SPL",
spl_functions,
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 64f27ef5..a4905b8a 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -3448,7 +3448,7 @@ static const zend_module_dep standard_deps[] = { /* {{{ */
};
/* }}} */
-zend_module_entry basic_functions_module = { /* {{{ */
+__attribute__((visibility("default"))) zend_module_entry basic_functions_module = { /* {{{ */
STANDARD_MODULE_HEADER_EX,
NULL,
standard_deps,

View file

@ -0,0 +1,115 @@
diff -up php-7.3.4/build/Makefile.global.omv~ php-7.3.4/build/Makefile.global
--- php-7.3.4/build/Makefile.global.omv~ 2019-04-03 03:49:31.503343477 +0200
+++ php-7.3.4/build/Makefile.global 2019-04-03 03:49:41.524376338 +0200
@@ -16,7 +16,7 @@ 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 $@
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
diff -up php-7.3.4/sapi/cgi/config9.m4.omv~ php-7.3.4/sapi/cgi/config9.m4
--- php-7.3.4/sapi/cgi/config9.m4.omv~ 2019-04-03 03:49:12.605281759 +0200
+++ php-7.3.4/sapi/cgi/config9.m4 2019-04-03 03:49:28.095332321 +0200
@@ -53,16 +53,16 @@ if test "$PHP_CGI" != "no"; then
case $host_alias in
*aix*)
if test "$php_sapi_module" = "shared"; then
- BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
else
- BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
fi
;;
*darwin*)
BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_FASTCGI_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
;;
*)
- BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ BUILD_CGI="\$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
;;
esac
diff -up php-7.3.4/sapi/cgi/config.w32.omv~ php-7.3.4/sapi/cgi/config.w32
diff -up php-7.3.4/sapi/fpm/config.m4.omv~ php-7.3.4/sapi/fpm/config.m4
--- php-7.3.4/sapi/fpm/config.m4.omv~ 2019-04-03 03:48:02.579056166 +0200
+++ php-7.3.4/sapi/fpm/config.m4 2019-04-03 03:48:15.722098116 +0200
@@ -706,13 +706,13 @@ if test "$PHP_FPM" != "no"; then
case $host_alias in
*aix*)
- BUILD_FPM="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FPM_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_FPM_OBJS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
+ BUILD_FPM="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FPM_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_FPM_OBJS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
;;
*darwin*)
BUILD_FPM="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_FASTCGI_OBJS:.lo=.o) \$(PHP_FPM_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
;;
*)
- BUILD_FPM="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_FPM_OBJS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
+ BUILD_FPM="\$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_FPM_OBJS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
;;
esac
diff -up php-7.3.4/sapi/phpdbg/config.m4.omv~ php-7.3.4/sapi/phpdbg/config.m4
--- php-7.3.4/sapi/phpdbg/config.m4.omv~ 2019-04-03 03:48:27.441135676 +0200
+++ php-7.3.4/sapi/phpdbg/config.m4 2019-04-03 03:48:43.169186314 +0200
@@ -37,7 +37,7 @@ if test "$BUILD_PHPDBG" = "" && test "$P
BUILD_BINARY="sapi/phpdbg/phpdbg"
BUILD_SHARED="sapi/phpdbg/libphpdbg.la"
- BUILD_PHPDBG="\$(LIBTOOL) --mode=link \
+ BUILD_PHPDBG="\$(LIBTOOL) --mode=link --tag=CC \
\$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \
\$(PHP_GLOBAL_OBJS) \
\$(PHP_BINARY_OBJS) \
@@ -48,7 +48,7 @@ if test "$BUILD_PHPDBG" = "" && test "$P
\$(PHP_FRAMEWORKS) \
-o \$(BUILD_BINARY)"
- BUILD_PHPDBG_SHARED="\$(LIBTOOL) --mode=link \
+ BUILD_PHPDBG_SHARED="\$(LIBTOOL) --mode=link --tag=CC \
\$(CC) -shared -Wl,-soname,libphpdbg.so -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \
\$(PHP_GLOBAL_OBJS) \
\$(PHP_BINARY_OBJS) \
diff -up php-7.3.4/sapi/phpdbg/config..omv~ php-7.3.4/sapi/phpdbg/config.
diff -up php-7.3.4/sapi/cli/config.m4.omv~ php-7.3.4/sapi/cli/config.m4
--- php-7.3.4/sapi/cli/config.m4.omv~ 2019-04-03 03:52:42.245983057 +0200
+++ php-7.3.4/sapi/cli/config.m4 2019-04-03 03:52:55.589028777 +0200
@@ -33,16 +33,16 @@ if test "$PHP_CLI" != "no"; then
case $host_alias in
*aix*)
if test "$php_sapi_module" = "shared"; then
- BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
+ BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
else
- BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
+ BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
fi
;;
*darwin*)
BUILD_CLI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
;;
*)
- BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
+ BUILD_CLI="\$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
;;
esac
diff -up php-7.3.4/configure.ac.omv~ php-7.3.4/configure.ac
--- php-7.3.4/configure.ac.omv~ 2019-04-03 14:28:11.391584272 +0200
+++ php-7.3.4/configure.ac 2019-04-03 14:29:17.445196792 +0200
@@ -1479,8 +1479,9 @@ PHP_SET_LIBTOOL_VARIABLE([--silent])
dnl libtool 1.4.3 needs this.
PHP_SET_LIBTOOL_VARIABLE([--preserve-dup-deps])
+PHP_SET_LIBTOOL_VARIABLE([--tag=CC])
-test -z "$PHP_COMPILE" && PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
-test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $<'
+test -z "$PHP_COMPILE" && PHP_COMPILE='$(LIBTOOL) --mode=compile --tag=CC $(COMPILE) -c $<'
+test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --mode=compile --tag=CXX $(CXX_COMPILE) -c $<'
SHARED_LIBTOOL='$(LIBTOOL)'
CC=$old_CC

35
php-7.4.0-phpize.patch Normal file
View file

@ -0,0 +1,35 @@
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()
$PHP_AUTOHEADER || exit 1
}
+phpize_check_headers()
+{
+ if test ! -f $includedir/main/php.h; then
+ echo "Can't find PHP headers in $includedir"
+ echo "The php-devel package is required for use of this command."
+ exit 1
+ fi
+}
+
# Main script
case "$1" in
@@ -183,12 +192,15 @@ case "$1" in
# Version
--version|-v)
+ phpize_check_headers
phpize_print_api_numbers
exit 0
;;
# Default
*)
+ phpize_check_headers
+
phpize_check_configm4 0
phpize_check_build_files

View file

@ -0,0 +1,36 @@
diff -up php-7.4.1/build/Makefile.global.omv~ php-7.4.1/build/Makefile.global
--- php-7.4.1/build/Makefile.global.omv~ 2020-01-09 17:28:46.652882773 +0100
+++ php-7.4.1/build/Makefile.global 2020-01-09 17:28:59.936882128 +0100
@@ -16,7 +16,7 @@ build-modules: $(PHP_MODULES) $(PHP_ZEND
build-binaries: $(PHP_BINARIES)
libphp$(PHP_MAJOR_VERSION)_common.la: $(PHP_GLOBAL_OBJS)
- $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -version-info 8:0:3 -rpath $(phptempdir) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -version-info 8:0:3 -rpath $(phptempdir) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -lz -o $@
-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
libphp$(PHP_MAJOR_VERSION).la: libphp$(PHP_MAJOR_VERSION)_common.la $(PHP_SAPI_OBJS)
diff -up php-7.4.1/ext/hash/hash.c.omv~ php-7.4.1/ext/hash/hash.c
--- php-7.4.1/ext/hash/hash.c.omv~ 2020-01-09 15:43:14.481189986 +0100
+++ php-7.4.1/ext/hash/hash.c 2020-01-09 15:43:30.344189217 +0100
@@ -1486,7 +1486,7 @@ static const zend_function_entry hash_fu
/* {{{ hash_module_entry
*/
-zend_module_entry hash_module_entry = {
+__attribute__((visibility("default"))) zend_module_entry hash_module_entry = {
STANDARD_MODULE_HEADER,
PHP_HASH_EXTNAME,
hash_functions,
diff -up php-7.4.1/ext/gd/gd.c.omv~ php-7.4.1/ext/gd/gd.c
--- php-7.4.1/ext/gd/gd.c.omv~ 2020-01-10 21:34:30.189975665 +0100
+++ php-7.4.1/ext/gd/gd.c 2020-01-10 21:34:43.455975021 +0100
@@ -1018,7 +1018,7 @@ static const zend_function_entry gd_func
};
/* }}} */
-zend_module_entry gd_module_entry = {
+__attribute__((visibility("default"))) zend_module_entry gd_module_entry = {
STANDARD_MODULE_HEADER,
"gd",
gd_functions,

View file

@ -0,0 +1,339 @@
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 33dfea0..057fe96 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1636,7 +1636,9 @@ ZEND_FUNCTION(set_error_handler)
zend_string *error_handler_name = zend_get_callable_name(error_handler);
zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback",
get_active_function_name(), error_handler_name?ZSTR_VAL(error_handler_name):"unknown");
- zend_string_release_ex(error_handler_name, 0);
+ if (error_handler_name) {
+ zend_string_release_ex(error_handler_name, 0);
+ }
return;
}
}
@@ -1703,7 +1705,9 @@ ZEND_FUNCTION(set_exception_handler)
zend_string *exception_handler_name = zend_get_callable_name(exception_handler);
zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback",
get_active_function_name(), exception_handler_name?ZSTR_VAL(exception_handler_name):"unknown");
- zend_string_release_ex(exception_handler_name, 0);
+ if (exception_handler_name) {
+ zend_string_release_ex(exception_handler_name, 0);
+ }
return;
}
}
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 2d52e4e..a1c1022 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -1040,8 +1040,12 @@ ZEND_API ZEND_COLD void zend_exception_error(zend_object *ex, int severity) /* {
zend_error_va(severity, (file && ZSTR_LEN(file) > 0) ? ZSTR_VAL(file) : NULL, line,
"Uncaught %s\n thrown", ZSTR_VAL(str));
- zend_string_release_ex(str, 0);
- zend_string_release_ex(file, 0);
+ if (str) {
+ zend_string_release_ex(str, 0);
+ }
+ if (file) {
+ zend_string_release_ex(file, 0);
+ }
} else {
zend_error(severity, "Uncaught exception '%s'", ZSTR_VAL(ce_exception->name));
}
diff --git a/Zend/zend_multibyte.c b/Zend/zend_multibyte.c
index 956ffbb..0c7c65e 100644
--- a/Zend/zend_multibyte.c
+++ b/Zend/zend_multibyte.c
@@ -115,6 +115,9 @@ ZEND_API int zend_multibyte_set_functions(const zend_multibyte_functions *functi
*/
{
const char *value = zend_ini_string("zend.script_encoding", sizeof("zend.script_encoding") - 1, 0);
+ if (!value) {
+ return FAILURE;
+ }
zend_multibyte_set_script_encoding_by_string(value, strlen(value));
}
return SUCCESS;
diff --git a/ext/dom/entity.c b/ext/dom/entity.c
index b412550..34b83ee 100644
--- a/ext/dom/entity.c
+++ b/ext/dom/entity.c
@@ -106,6 +106,9 @@ int dom_entity_notation_name_read(dom_object *obj, zval *retval)
ZVAL_NULL(retval);
} else {
content = (char *) xmlNodeGetContent((xmlNodePtr) nodep);
+ if (!content) {
+ return FAILURE;
+ }
ZVAL_STRING(retval, content);
xmlFree(content);
}
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index ecab916..06bb697 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -2751,8 +2751,10 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
newentry = phar_open_jit(phar, entry, error);
if (!newentry) {
/* major problem re-opening, so we ignore this file and the error */
- efree(*error);
- *error = NULL;
+ if (error) {
+ efree(*error);
+ *error = NULL;
+ }
continue;
}
entry = newentry;
diff --git a/ext/phar/tar.c b/ext/phar/tar.c
index 03e6dd4..52b5c5d 100644
--- a/ext/phar/tar.c
+++ b/ext/phar/tar.c
@@ -899,7 +899,7 @@ int phar_tar_setmetadata(zval *metadata, phar_entry_info *entry, char **error) /
spprintf(error, 0, "phar error: unable to create temporary file");
return -1;
}
- if (ZSTR_LEN(entry->metadata_str.s) != php_stream_write(entry->fp, ZSTR_VAL(entry->metadata_str.s), ZSTR_LEN(entry->metadata_str.s))) {
+ if (entry->metadata_str.s && ZSTR_LEN(entry->metadata_str.s) != php_stream_write(entry->fp, ZSTR_VAL(entry->metadata_str.s), ZSTR_LEN(entry->metadata_str.s))) {
spprintf(error, 0, "phar tar error: unable to write metadata to magic metadata file \"%s\"", entry->filename);
zend_hash_str_del(&(entry->phar->manifest), entry->filename, entry->filename_len);
return ZEND_HASH_APPLY_STOP;
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index f4d8066..9386c05 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -877,7 +877,9 @@ static int sqlite3_do_callback(struct php_sqlite3_fci *fc, zval *cb, int argc, s
if (agg_context && !Z_ISUNDEF(agg_context->zval_context)) {
zval_ptr_dtor(&agg_context->zval_context);
}
- ZVAL_COPY_VALUE(&agg_context->zval_context, &retval);
+ if (agg_context) {
+ ZVAL_COPY_VALUE(&agg_context->zval_context, &retval);
+ }
ZVAL_UNDEF(&retval);
}
diff --git a/ext/standard/filters.c b/ext/standard/filters.c
index 018270c..6acce21 100644
--- a/ext/standard/filters.c
+++ b/ext/standard/filters.c
@@ -766,7 +766,7 @@ static void php_conv_qprint_encode_dtor(php_conv_qprint_encode *inst)
}
#define NEXT_CHAR(ps, icnt, lb_ptr, lb_cnt, lbchars) \
- ((lb_ptr) < (lb_cnt) ? (lbchars)[(lb_ptr)] : *(ps))
+ ((lb_ptr) < (lb_cnt) && (lbchars) ? (lbchars)[(lb_ptr)] : ((ps) ? *(ps) : '\0'))
#define CONSUME_CHAR(ps, icnt, lb_ptr, lb_cnt) \
if ((lb_ptr) < (lb_cnt)) { \
diff --git a/ext/standard/var.c b/ext/standard/var.c
index 37a68bb..ba68cf3 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -1070,8 +1070,10 @@ again:
/* Mark this value in the var_hash, to avoid creating references to it. */
zval *var_idx = zend_hash_index_find(&var_hash->ht,
(zend_ulong) (zend_uintptr_t) Z_COUNTED_P(struc));
- ZVAL_LONG(var_idx, -1);
- smart_str_appendl(buf, "N;", 2);
+ if (var_idx) {
+ ZVAL_LONG(var_idx, -1);
+ smart_str_appendl(buf, "N;", 2);
+ }
}
if (serialized_data) {
efree(serialized_data);
diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c
index 7a05286..378c585 100644
--- a/sapi/fpm/fpm/fpm_conf.c
+++ b/sapi/fpm/fpm/fpm_conf.c
@@ -720,8 +720,8 @@ static int fpm_evaluate_full_path(char **path, struct fpm_worker_pool_s *wp, cha
}
if (strlen(*path) > strlen("$prefix")) {
- free(*path);
tmp = strdup((*path) + strlen("$prefix"));
+ free(*path);
*path = tmp;
} else {
free(*path);
diff --git a/sapi/fpm/fpm/zlog.c b/sapi/fpm/fpm/zlog.c
index 4808447..849370c 100644
--- a/sapi/fpm/fpm/zlog.c
+++ b/sapi/fpm/fpm/zlog.c
@@ -348,7 +348,7 @@ static ssize_t zlog_stream_direct_write(
static inline ssize_t zlog_stream_unbuffered_write(
struct zlog_stream *stream, const char *buf, size_t len) /* {{{ */
{
- const char *append;
+ const char *append = NULL;
size_t append_len = 0, required_len, reserved_len;
ssize_t written;
@@ -637,10 +637,10 @@ zlog_bool zlog_stream_set_msg_suffix(
if (suffix != NULL) {
stream->msg_suffix_len = strlen(suffix);
len = stream->msg_suffix_len + 1;
- stream->msg_suffix = malloc(len);
if (stream->msg_suffix != NULL) {
free(stream->msg_suffix);
}
+ stream->msg_suffix = malloc(len);
if (stream->msg_suffix == NULL) {
return ZLOG_FALSE;
}
@@ -652,7 +652,7 @@ zlog_bool zlog_stream_set_msg_suffix(
len = stream->msg_final_suffix_len + 1;
stream->msg_final_suffix = malloc(len);
if (stream->msg_final_suffix != NULL) {
- free(stream->msg_suffix);
+ free(stream->msg_final_suffix);
}
if (stream->msg_final_suffix == NULL) {
return ZLOG_FALSE;
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index 6b0de5c..0764789 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -544,6 +544,9 @@ int phpdbg_compile_stdin(zend_string *code) {
/* remove trailing data after zero byte, used for avoiding conflicts in eval()'ed code snippets */
zend_string *source_path = strpprintf(0, "Standard input code%c%p", 0, PHPDBG_G(ops)->opcodes);
phpdbg_file_source *data = zend_hash_find_ptr(&PHPDBG_G(file_sources), source_path);
+ if (!data) {
+ return FAILURE;
+ }
dtor_func_t dtor = PHPDBG_G(file_sources).pDestructor;
PHPDBG_G(file_sources).pDestructor = NULL;
zend_hash_del(&PHPDBG_G(file_sources), source_path);
@@ -1349,7 +1352,7 @@ PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, char **name)
module_entry->handle = handle;
if ((module_entry = zend_register_module_ex(module_entry)) == NULL) {
- phpdbg_error("dl", "type=\"registerfailure\" module=\"%s\"", "Unable to register module %s", module_entry->name);
+ phpdbg_error("dl", "type=\"registerfailure\" module=\"%s\"", "Unable to register module %s", "Unknown module");
goto quit;
}
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index 4d10e68..1acfec6 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -926,6 +926,7 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void
}
}
+ return PHP_STREAM_OPTION_RETURN_NOTIMPL;
#ifdef PHP_WIN32
case PHP_STREAM_OPTION_PIPE_BLOCKING:
data->is_pipe_blocking = value;
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index b0de6e4..5e3adec 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -2654,16 +2654,14 @@
zend_throw_exception_ex(phar_ce_PharException, 0, "phar \"%s\" is persistent, unable to copy on write", phar_obj->archive->fname);
return;
}
- if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint32_t) fname_len)) {
- if (NULL != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len))) {
- if (entry->is_deleted) {
- /* entry is deleted, but has not been flushed to disk yet */
- RETURN_TRUE;
- } else {
- entry->is_deleted = 1;
- entry->is_modified = 1;
- phar_obj->archive->is_modified = 1;
- }
+ if (NULL != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len))) {
+ if (entry->is_deleted) {
+ /* entry is deleted, but has not been flushed to disk yet */
+ RETURN_TRUE;
+ } else {
+ entry->is_deleted = 1;
+ entry->is_modified = 1;
+ phar_obj->archive->is_modified = 1;
}
} else {
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Entry %s does not exist and cannot be deleted", fname);
@@ -3478,18 +3476,16 @@
RETURN_FALSE;
}
- if (!zend_hash_str_exists(&phar_obj->archive->manifest, oldfile, (uint32_t) oldfile_len) || NULL == (oldentry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, oldfile, (uint32_t) oldfile_len)) || oldentry->is_deleted) {
+ if (NULL == (oldentry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, oldfile, (uint32_t) oldfile_len)) || oldentry->is_deleted) {
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0,
"file \"%s\" cannot be copied to file \"%s\", file does not exist in %s", oldfile, newfile, phar_obj->archive->fname);
RETURN_FALSE;
}
- if (zend_hash_str_exists(&phar_obj->archive->manifest, newfile, (uint32_t) newfile_len)) {
- if (NULL != (temp = zend_hash_str_find_ptr(&phar_obj->archive->manifest, newfile, (uint32_t) newfile_len)) || !temp->is_deleted) {
- zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0,
- "file \"%s\" cannot be copied to file \"%s\", file must not already exist in phar %s", oldfile, newfile, phar_obj->archive->fname);
- RETURN_FALSE;
- }
+ if (NULL != (temp = zend_hash_str_find_ptr(&phar_obj->archive->manifest, newfile, (uint32_t) newfile_len)) && !temp->is_deleted) {
+ zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0,
+ "file \"%s\" cannot be copied to file \"%s\", file must not already exist in phar %s", oldfile, newfile, phar_obj->archive->fname);
+ RETURN_FALSE;
}
tmp_len = newfile_len;
diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c
index 6ce9d4b..d8e26f6 100644
--- a/ext/enchant/enchant.c
+++ b/ext/enchant/enchant.c
@@ -269,7 +269,9 @@ static void php_enchant_dict_free(zend_resource *rsrc) /* {{{ */
enchant_broker_free_dict(pbroker->pbroker, pdict->pdict);
}
- pbroker->dict[pdict->id] = NULL;
+ if (pbroker->dict)
+ pbroker->dict[pdict->id] = NULL;
+
efree(pdict);
zend_list_delete(pbroker->rsrc);
}
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c
index ac476b3..9b51dd0 100644
--- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c
+++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c
@@ -682,7 +682,7 @@ mbfl_filt_conv_jis2004_flush(mbfl_convert_filter *filter)
k = filter->cache;
filter->cache = 0;
- if (filter->status == 1 && k >= 0 && k <= jisx0213_u2_tbl_len) {
+ if (filter->status == 1 && k >= 0 && k < jisx0213_u2_tbl_len) {
s1 = jisx0213_u2_fb_tbl[k];
if (filter->to->no_encoding == mbfl_no_encoding_sjis2004) {
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index e0cf63d..d30d9e1 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -907,7 +907,7 @@ static xmlNodePtr to_xml_string(encodeTypePtr type, zval *data, int style, xmlNo
xmlAddChild(ret, text);
efree(str);
- if (style == SOAP_ENCODED) {
+ if (style == SOAP_ENCODED && type) {
set_ns_and_type(ret, type);
}
return ret;
diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c
index 4dcaf12..96e516b 100644
--- a/ext/mysqlnd/mysqlnd_result.c
+++ b/ext/mysqlnd/mysqlnd_result.c
@@ -1396,8 +1396,8 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const c
UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status));
free_end:
PACKET_FREE(&row_packet);
+ DBG_INF_FMT("rows=%llu", (unsigned long long)set->row_count);
end:
- DBG_INF_FMT("rows=%llu", (unsigned long long)result->stored_data->row_count);
DBG_RETURN(ret);
}
/* }}} */

2017
php-7.4.33-openssl3.patch Normal file

File diff suppressed because one or more lines are too long

View file

@ -110,7 +110,7 @@ diff -Naurp php-5.3.4RC1/ext/imap/php_imap.c php-5.3.4RC1.oden/ext/imap/php_imap
+ long ret; + long ret;
+ +
+ // TODO: Use zend_parse_parameters here + // TODO: Use zend_parse_parameters here
+ if (ZEND_NUM_ARGS() != 5 || zend_get_parameters_ex(5, &streamind, &mailbox, &entry, &attr, &value) == FAILURE) { + if (ZEND_NUM_ARGS() != 5 || zend_parse_parameters(5 TSRMLS_CC, "zzzzz", &streamind, &mailbox, &entry, &attr, &value) == FAILURE) {
+ ZEND_WRONG_PARAM_COUNT(); + ZEND_WRONG_PARAM_COUNT();
+ } + }
+ +
@ -158,7 +158,7 @@ diff -Naurp php-5.3.4RC1/ext/imap/php_imap.c php-5.3.4RC1.oden/ext/imap/php_imap
+ pils *imap_le_struct; + pils *imap_le_struct;
+ long ret; + long ret;
+ +
+ if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &streamind, &mailbox, &entry, &attr) == FAILURE) { + if(ZEND_NUM_ARGS() != 4 || zend_parse_parameters(4 TSRMLS_CC, "zzzz", &streamind, &mailbox, &entry, &attr) == FAILURE) {
+ ZEND_WRONG_PARAM_COUNT(); + ZEND_WRONG_PARAM_COUNT();
+ } + }
@ -226,7 +226,7 @@ diff -Naurp php-5.3.4RC1/ext/imap/php_imap.c php-5.3.4RC1.oden/ext/imap/php_imap
+ pils *imap_le_struct; + pils *imap_le_struct;
+ long flags = 0L; + long flags = 0L;
+ +
+ if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &streamind, &pflags) == FAILURE) { + if (ZEND_NUM_ARGS() != 2 || zend_parse_parameters(2, "zz", &streamind, &pflags) == FAILURE) {
+ ZEND_WRONG_PARAM_COUNT(); + ZEND_WRONG_PARAM_COUNT();
+ } + }
+ +

View file

@ -54,7 +54,7 @@ diff -Naurp php-5.3.4RC1/ext/imap/php_imap.c php-5.3.4RC1.oden/ext/imap/php_imap
+ zval **streamind, **mailbox; + zval **streamind, **mailbox;
+ pils *imap_le_struct; + pils *imap_le_struct;
+ +
+ if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &streamind, &mailbox) == FAILURE) { + if(ZEND_NUM_ARGS() != 2 || zend_parse_parameters(2 TSRMLS_CC, "zz", &streamind, &mailbox) == FAILURE) {
+ ZEND_WRONG_PARAM_COUNT(); + ZEND_WRONG_PARAM_COUNT();
+ } + }
+ +

View file

@ -0,0 +1,47 @@
diff -ruN a/ext/gd/gd.c b/ext/gd/gd.c
--- a/ext/gd/gd.c 2021-09-21 20:23:13.000000000 +0900
+++ b/ext/gd/gd.c 2021-09-25 12:14:22.927843511 +0900
@@ -97,6 +97,11 @@
#include "gd_ctx.c"
+/* don't used libgd constants, not used, so going to be removed */
+#define PHP_GD_FLIP_HORIZONTAL 1
+#define PHP_GD_FLIP_VERTICAL 2
+#define PHP_GD_FLIP_BOTH 3
+
/* as it is not really public, duplicate declaration here to avoid
pointless warnings */
int overflow2(int a, int b);
@@ -1137,9 +1142,9 @@
/* GD2 image format types */
REGISTER_LONG_CONSTANT("IMG_GD2_RAW", GD2_FMT_RAW, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_GD2_COMPRESSED", GD2_FMT_COMPRESSED, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", GD_FLIP_HORINZONTAL, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("IMG_FLIP_VERTICAL", GD_FLIP_VERTICAL, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("IMG_FLIP_BOTH", GD_FLIP_BOTH, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", PHP_GD_FLIP_HORIZONTAL, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("IMG_FLIP_VERTICAL", PHP_GD_FLIP_VERTICAL, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("IMG_FLIP_BOTH", PHP_GD_FLIP_BOTH, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_EFFECT_REPLACE", gdEffectReplace, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_EFFECT_ALPHABLEND", gdEffectAlphaBlend, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_EFFECT_NORMAL", gdEffectNormal, CONST_CS | CONST_PERSISTENT);
@@ -4696,15 +4701,15 @@
}
switch (mode) {
- case GD_FLIP_VERTICAL:
+ case PHP_GD_FLIP_VERTICAL:
gdImageFlipVertical(im);
break;
- case GD_FLIP_HORINZONTAL:
+ case PHP_GD_FLIP_HORIZONTAL:
gdImageFlipHorizontal(im);
break;
- case GD_FLIP_BOTH:
+ case PHP_GD_FLIP_BOTH:
gdImageFlipBoth(im);
break;

View file

@ -1,17 +1,17 @@
--- php-7.2.0/Makefile.global.shared.droplet 2017-11-28 10:22:51.000000000 +0100 --- php-7.2.0/build/Makefile.global.shared.droplet 2017-11-28 10:22:51.000000000 +0100
+++ php-7.2.0/Makefile.global 2017-11-29 00:28:39.001984696 +0100 +++ php-7.2.0/build/Makefile.global 2017-11-29 00:28:39.001984696 +0100
@@ -15,8 +15,12 @@ build-modules: $(PHP_MODULES) $(PHP_ZEND @@ -15,8 +15,12 @@ build-modules: $(PHP_MODULES) $(PHP_ZEND
build-binaries: $(PHP_BINARIES) build-binaries: $(PHP_BINARIES)
-libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) -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 $@ - $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
+libphp$(PHP_MAJOR_VERSION)_common.la: $(PHP_GLOBAL_OBJS) +libphp$(PHP_MAJOR_VERSION)_common.la: $(PHP_GLOBAL_OBJS)
+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -version-info 8:0:3 -rpath $(phptempdir) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ + $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -version-info 8:0:3 -rpath $(phptempdir) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
+ -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1 + -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
+ +
+libphp$(PHP_MAJOR_VERSION).la: libphp$(PHP_MAJOR_VERSION)_common.la $(PHP_SAPI_OBJS) +libphp$(PHP_MAJOR_VERSION).la: libphp$(PHP_MAJOR_VERSION)_common.la $(PHP_SAPI_OBJS)
+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) libphp$(PHP_MAJOR_VERSION)_common.la $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ + $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) libphp$(PHP_MAJOR_VERSION)_common.la $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1 -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
@ -35,8 +35,8 @@
BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_FASTCGI_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_FASTCGI_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
;; ;;
*) *)
- BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" - BUILD_CGI="\$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) libphp\$(PHP_MAJOR_VERSION)_common.la \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" + BUILD_CGI="\$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) libphp\$(PHP_MAJOR_VERSION)_common.la \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
;; ;;
esac esac
@ -56,8 +56,8 @@
BUILD_CLI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" BUILD_CLI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
;; ;;
*) *)
- BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" - BUILD_CLI="\$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
+ BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) libphp\$(PHP_MAJOR_VERSION)_common.la \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" + BUILD_CLI="\$(LIBTOOL) --mode=link --tag=CC \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) libphp\$(PHP_MAJOR_VERSION)_common.la \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
;; ;;
esac esac

View file

@ -1,6 +1,7 @@
--- php-7.0.1/sapi/apache2handler/sapi_apache2.c.umask.droplet 2015-12-16 11:41:54.000000000 +0100 diff -up php-7.4.1/sapi/apache2handler/sapi_apache2.c.umask.droplet php-7.4.1/sapi/apache2handler/sapi_apache2.c
+++ php-7.0.1/sapi/apache2handler/sapi_apache2.c 2015-12-29 00:40:11.502348482 +0100 --- php-7.4.1/sapi/apache2handler/sapi_apache2.c.umask.droplet 2019-12-17 17:35:58.000000000 +0100
@@ -475,6 +475,19 @@ static apr_status_t php_server_context_c +++ php-7.4.1/sapi/apache2handler/sapi_apache2.c 2020-01-08 22:26:12.858208748 +0100
@@ -499,6 +499,19 @@ static apr_status_t php_server_context_c
return APR_SUCCESS; return APR_SUCCESS;
} }
@ -20,16 +21,17 @@
static int php_apache_request_ctor(request_rec *r, php_struct *ctx) static int php_apache_request_ctor(request_rec *r, php_struct *ctx)
{ {
char *content_length; char *content_length;
@@ -669,6 +682,8 @@ zend_first_try { @@ -694,6 +707,9 @@ zend_first_try {
highlight_file((char *)r->filename, &syntax_highlighter_ini);
} else { } else {
zend_file_handle zfd; zend_file_handle zfd;
+
+ php_save_umask(); + php_save_umask();
+ +
zfd.type = ZEND_HANDLE_FILENAME; zend_stream_init_filename(&zfd, (char *) r->filename);
zfd.filename = (char *) r->filename;
zfd.free_filename = 0; if (!parent_req) {
@@ -680,6 +695,8 @@ zend_first_try { @@ -702,6 +718,8 @@ zend_first_try {
zend_execute_scripts(ZEND_INCLUDE, NULL, 1, &zfd); zend_execute_scripts(ZEND_INCLUDE, NULL, 1, &zfd);
} }

View file

@ -1,6 +1,6 @@
--- php-7.0.1/sapi/apache2handler/php_functions.c.apache2-filters.droplet 2015-12-16 11:41:55.000000000 +0100 --- php-7.0.1/sapi/apache2handler/php_functions.c.apache2-filters.droplet 2015-12-16 11:41:55.000000000 +0100
+++ php-7.0.1/sapi/apache2handler/php_functions.c 2015-12-29 00:12:07.202603653 +0100 +++ php-7.0.1/sapi/apache2handler/php_functions.c 2015-12-29 00:12:07.202603653 +0100
@@ -216,6 +216,65 @@ PHP_FUNCTION(apache_response_headers) @@ -216,6 +216,63 @@ PHP_FUNCTION(apache_response_headers)
} }
/* }}} */ /* }}} */
@ -38,19 +38,17 @@
+{ +{
+ php_struct *ctx; + php_struct *ctx;
+ int arg_count = ZEND_NUM_ARGS(); + int arg_count = ZEND_NUM_ARGS();
+ zval **filter_name; + char *filter_name;
+ ap_filter_rec_t* ap_filter; + ap_filter_rec_t* ap_filter;
+ +
+ if (arg_count != 1 /*|| + if (arg_count != 1 ||
+ zend_get_parameters_ex(arg_count, &filter_name) == FAILURE*/) { + zend_parse_parameters(arg_count TSRMLS_CC, "s", &filter_name) == FAILURE) {
+ WRONG_PARAM_COUNT; + WRONG_PARAM_COUNT;
+ } + }
+ +
+ ctx = SG(server_context); + ctx = SG(server_context);
+ +
+ convert_to_string_ex(filter_name); + ap_filter = ap_get_output_filter_handle(filter_name);
+
+ ap_filter = ap_get_output_filter_handle(Z_STRVAL_P(*filter_name));
+ +
+ /* requested output filter was not found */ + /* requested output filter was not found */
+ if(ap_filter == NULL) { + if(ap_filter == NULL) {

2178
php7.spec Normal file

File diff suppressed because it is too large Load diff