1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Commit Graph

6630 Commits

Author SHA1 Message Date
David Carlier
509cb06dc2 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20554: php_cli_server() get http status as string build issue.
2025-11-22 22:26:10 +00:00
David Carlier
5562e5558a Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20554: php_cli_server() get http status as string build issue.
2025-11-22 22:26:01 +00:00
David Carlier
30fbcf9d7e Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20554: php_cli_server() get http status as string build issue.
2025-11-22 22:25:51 +00:00
David Carlier
9149c35514 Fix GH-20554: php_cli_server() get http status as string build issue.
due to the signature of this helper it needs to be const also
bsearch key argument needs to be too.

close GH-20556
2025-11-22 22:25:33 +00:00
Gina Peter Banyard
0c97fe082f Merge branch 'PHP-8.5'
* PHP-8.5:
  sapi/phpdbg: use 'h' ZPP specifier instead of'H'
2025-11-13 01:34:03 +00:00
Gina Peter Banyard
e1c8ed614e Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  sapi/phpdbg: use 'h' ZPP specifier instead of'H'
2025-11-13 01:32:14 +00:00
Gina Peter Banyard
a7fd6fc8d6 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  sapi/phpdbg: use 'h' ZPP specifier instead of'H'
2025-11-13 01:31:42 +00:00
Gina Peter Banyard
37e61a0dc0 sapi/phpdbg: fixed ZPP type violation by using 'h' ZPP specifier instead of 'H'
This aligns the behaviour with what the stubs say.
And even if one fixes the stubs the behaviour is not identical due to missing indirect handling.

This indicates that using objects is never done, so do the easy fix of changing the ZPP specifier.

Closes GH-20465
2025-11-13 01:30:49 +00:00
Gina Peter Banyard
414e7db68a sapi/phpdbg: use 'h' ZPP specifier instead of'H'
The stubs say array so in debug mode we get a ZPP violation assertion and even by fixing the stubs the behaviour is not identical due to missing indirect handling.

This indicates using objects was never done, thus use the correct ZPP specifier
2025-11-12 16:01:43 +00:00
Ilija Tovilo
51edaac9cf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Skip fpm tests crashing lsan on GHA
2025-11-05 13:23:09 +01:00
Ilija Tovilo
b9eaee18e4 [skip ci] Skip fpm tests crashing lsan on GHA
> LeakSanitizer has encountered a fatal error.

This happens only on 8.2/8.3 for some reason. Don't merge for 8.4 for now, we
can do that later if it reoccurs.
2025-11-05 13:22:44 +01:00
Ilija Tovilo
a7fde28d90 Merge branch 'PHP-8.5'
* PHP-8.5:
  [skip ci] Fix typo
2025-10-17 13:22:57 +02:00
Ilija Tovilo
f67f79cbcd Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  [skip ci] Fix typo
2025-10-17 13:22:51 +02:00
Ilija Tovilo
5a427cee98 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Fix typo
2025-10-17 13:22:44 +02:00
Ilija Tovilo
5fd73b55a7 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix typo
2025-10-17 13:22:37 +02:00
Ilija Tovilo
413c73153d Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Fix typo
2025-10-17 13:22:32 +02:00
Ilija Tovilo
d62f70c6de [skip ci] Fix typo
Should've been skip, not flaky...
2025-10-17 13:21:49 +02:00
Ilija Tovilo
abcf0c4418 Merge branch 'PHP-8.5'
* PHP-8.5:
  [skip ci] Skip suspicious fpm tests on GH actions & macOS
2025-10-17 13:17:55 +02:00
Ilija Tovilo
00bec81c1c Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  [skip ci] Skip suspicious fpm tests on GH actions & macOS
2025-10-17 13:17:48 +02:00
Ilija Tovilo
2fe20a075f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Skip suspicious fpm tests on GH actions & macOS
2025-10-17 13:17:41 +02:00
Ilija Tovilo
75099da105 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Skip suspicious fpm tests on GH actions & macOS
2025-10-17 13:17:33 +02:00
Ilija Tovilo
2b0763148d Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Skip suspicious fpm tests on GH actions & macOS
2025-10-17 13:17:25 +02:00
Ilija Tovilo
b094d5a588 [skip ci] Skip suspicious fpm tests on GH actions & macOS
There have been misterious macOS failures with the following error for a long
time, which would usually happen 1-2x per nightly run:

> The hosted runner lost communication with the server. Anything in your
> workflow that terminates the runner process, starves it for CPU/Memory, or
> blocks its network access can cause this error.

After way too much debugging, it looks like this is caused by the two fpm tests
skipped in this commit. When there's a failure, the responsible test will run
for at least 120 seconds until the job is eventually killed by GitHub Actions.
It's not clear yet why the tests stall.

Debugging this is a PITA because the GitHub Actions log gets partially lost for
killed jobs. It took an external log server to actually figure out where the job
fails. Let's disable the tests first to be sure this actually solves the issue.
2025-10-17 13:04:11 +02:00
Jakub Zelenka
12b16c6c93 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-19989: PHP 8.5 FPM access log lines also go to STDERR
2025-10-10 17:19:52 +02:00
Jakub Zelenka
234577ee90 Fix GH-19989: PHP 8.5 FPM access log lines also go to STDERR
This was due to not omitting logging using external_log

Closes GH-20123
2025-10-10 17:18:47 +02:00
Jakub Zelenka
02e38fe22e Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-19974: fpm_status_export_to_zval segfault for parallel execution
2025-10-09 21:35:37 +02:00
Jakub Zelenka
1570ce9f55 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-19974: fpm_status_export_to_zval segfault for parallel execution
2025-10-09 21:35:07 +02:00
Jakub Zelenka
da7558ab4e Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19974: fpm_status_export_to_zval segfault for parallel execution
2025-10-09 21:34:14 +02:00
Jakub Zelenka
059f9f78e5 Fix GH-19974: fpm_status_export_to_zval segfault for parallel execution
The fix fixes some other races that could result in mixed up copy and
nprocs number. It requires creating a copy in a similar way like for
request status.

This was not previously used to not impact other requests. However this
does not make that much sense as the only thing that impacts it is
holding the lock and not waiting for it. It is true that if there was a
big contention then the lock would be acquired more often but that can
be achieved by using fpm_get_status in loop so it should not make a
huge difference hopefully.

Closes GH-19974
2025-10-09 21:32:04 +02:00
Jakub Zelenka
b889ec41c1 Merge branch 'PHP-8.5'
* PHP-8.5:
  Add missing NEWS entry for FPM GH-19817 fix
  Fix GH-19817: Decode SCRIPT_FILENAME issue in php 8.5 (#20114)
2025-10-09 14:13:31 +02:00
Jakub Zelenka
74674c3d56 Fix GH-19817: Decode SCRIPT_FILENAME issue in php 8.5 (#20114)
This changes default for fastcgi.script_path_encoded INI to have
default behavior without a BC break. There has been already issue
about this in RC so it is very likely that it could have much bigger
impact so it's better to be safe.
2025-10-09 14:10:14 +02:00
Ilija Tovilo
b07bc62e0c Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ensure test passes with prod config
  Fix CGI with auto_globals_jit=0
2025-10-07 18:45:38 +02:00
Remi Collet
2f4b8e691a ensure test passes with prod config 2025-10-07 18:44:41 +02:00
Ilija Tovilo
9bc35f1982 Fix CGI with auto_globals_jit=0
In CGI, php_auto_globals_create_server() (i.e. auto_global_callback() here)
initializes $_ENV to reuse for $_SERVER. However, because $_SERVER is
constructed first, we have not yet initialized auto_global->armed of the $_ENV
global. Split the loop into initialization and constructor phases.

Fixes GH-19934
Closes GH-19870
2025-10-07 18:43:32 +02:00
Remi Collet
5c2f629a3d Merge branch 'PHP-8.5'
* PHP-8.5:
  ensure test passes with prod config
2025-10-07 16:06:27 +02:00
Remi Collet
9f55c1ae1c ensure test passes with prod config 2025-10-07 16:06:14 +02:00
Ilija Tovilo
a57fe1b00b Merge branch 'PHP-8.5'
* PHP-8.5:
  Treat accept failing with SOCK_EAGAIN as success in CLI web server
2025-10-06 14:20:50 +02:00
Ilija Tovilo
9130ddb42a Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Treat accept failing with SOCK_EAGAIN as success in CLI web server
2025-10-06 14:20:40 +02:00
Ilija Tovilo
0099779902 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Treat accept failing with SOCK_EAGAIN as success in CLI web server
2025-10-06 14:20:12 +02:00
Leo Gaskin
7e7d6d6380 Treat accept failing with SOCK_EAGAIN as success in CLI web server
This ensures that no useless "Failed to poll event" error messages are
logged during normal server operation, as the SOCK_EAGAIN error simply
indicates another worker is already serving the request.

Closes GH-19964
2025-10-06 14:19:45 +02:00
Gina Peter Banyard
c515c04b0a Zend: Convert _zend_op_array literal fields to uint32_t 2025-09-29 15:53:58 +01:00
Gina Peter Banyard
0a47dd9bb4 Zend: Convert _zend_op_array.last_try_catch field to uint32_t 2025-09-29 15:53:58 +01:00
Ilija Tovilo
decf77f2fb Merge branch 'PHP-8.4'
* PHP-8.4:
  [skip ci] Skip php_cli_server_pdeathsig.phpt if pgrep is missing
2025-09-23 17:15:17 +02:00
Ilija Tovilo
7bce6d89e7 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Skip php_cli_server_pdeathsig.phpt if pgrep is missing
2025-09-23 17:15:09 +02:00
Ilija Tovilo
c6a6cb79f9 [skip ci] Skip php_cli_server_pdeathsig.phpt if pgrep is missing
Fixes GH-19911
Closes GH-19923
2025-09-23 17:14:51 +02:00
Ilija Tovilo
8b51bcaa18 Fix CGI with auto_globals_jit=0
In CGI, php_auto_globals_create_server() (i.e. auto_global_callback() here)
initializes $_ENV to reuse for $_SERVER. However, because $_SERVER is
constructed first, we have not yet initialized auto_global->armed of the $_ENV
global. Split the loop into initialization and constructor phases.

Closes GH-19870
2025-09-23 16:53:11 +02:00
Ilija Tovilo
f389aded6a Warn on http_response_code() after header('HTTP/...')
Fixes GH-18582
Fixes #81451
Closes GH-18962

Co-authored-by: Jakub Zelenka <bukka@php.net>
2025-09-23 11:45:47 +02:00
Jakub Zelenka
1ac68e7b07 Fix GH-8157: post_max_size evaluates .user.ini too late in php-fpm
This introduces new SAPI callback that runs before post read

Closes GH-19333
2025-09-16 22:31:58 +02:00
Ilija Tovilo
7a06f6b4eb [fuzzer][skip ci] Wrap php_request_shutdown() in zend_try (GH-19846)
php_request_shutdown() may also bail. E.g. GH-19844.
2025-09-16 13:06:52 +02:00
Niels Dossche
bd4e2c78ac Fix fuzzer runner (#19676) 2025-09-11 22:36:26 +02:00