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

6621 Commits

Author SHA1 Message Date
Peter Kokot
c89b363fc9 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  sapi/*/Makefile.frag: install programs built with libtool, with libtool
2026-02-23 17:20:59 +01:00
Michael Orlitzky
db6cca26dd sapi/*/Makefile.frag: install programs built with libtool, with libtool
When installing executables that were built using libtool, we are
supposed to use

  $ libtool --mode-install <install-command>

rather than the bare <install-command>. This is discussed ever so
briefly in the "Installing executables" section of the GNU libtool
documentation:

  https://www.gnu.org/software/libtool/manual/libtool.html

So far this has not caused a problem with GNU libtool on the platforms
that PHP supports, but there is an alternate libtool implementation
called slibtool that stores wrappers at the locations where PHP is
expecting the true executables to live. As a result, the wrappers (and
not the executables) are installed when slibtool is used to build PHP.

This is fixed by replacing,

  $(INSTALL)

with

  $(LIBTOOL) --mode=install $(INSTALL)

in the install-foo rules for the executables that are built with
libtool.

Closes GH-13674
2026-02-23 17:19:23 +01: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
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
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
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
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
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
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
9f55c1ae1c ensure test passes with prod config 2025-10-07 16:06:14 +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
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
Jakub Zelenka
03d984e659 Merge branch 'PHP-8.4' 2025-09-09 22:04:20 +02:00
Jakub Zelenka
e946e9b329 Merge branch 'PHP-8.3' into PHP-8.4 2025-09-09 22:03:49 +02:00
Jakub Zelenka
3a17712269 Merge branch 'PHP-8.2' into PHP-8.3 2025-09-09 21:59:35 +02:00
Jakub Zelenka
6f92e9c054 Merge branch 'PHP-8.1' into PHP-8.2 2025-09-09 21:58:37 +02:00
Jakub Zelenka
c0f8bb6622 Revert "fix pipe detection for STDERR."
This reverts commit a757f276f9.
2025-09-09 21:57:54 +02:00
Remi Collet
7f9de57fb4 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Mark test as ONLINE (#19776)
2025-09-09 16:34:52 +02:00
Remi Collet
d2fa1ca600 Mark test as ONLINE (#19776) 2025-09-09 16:34:02 +02:00
Remi Collet
1c6d0e90f9 Mark test as ONLINE (#19776) 2025-09-09 16:19:05 +02:00
Tim Düsterhus
37bf0ec961 main: Deprecate deriving $_SERVER['argc'] and $_SERVER['argv'] from the query string (#19606)
* main: Ignore `register_argc_argv` when `SG(request_info).argc` is available

* sapi: Remove hardcoded `register_argc_argv` for CLI SAPIs

This INI is ignored since the previous commit, which makes the hardcoded
setting obsolete.

* main: Deprecate deriving $_SERVER['argc'] and $_SERVER['argv'] from the query string

RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_register_argc_argv_ini_directive

* main: Adjust deprecation message for `register_argc_argv`

* NEWS/UPGRADING
2025-09-09 10:34:35 +02:00