Commit Graph

1188 Commits

Author SHA1 Message Date
Jakub Zelenka
f3c357c446
Merge branch 'PHP-8.1' 2022-08-29 22:34:48 +01:00
Jakub Zelenka
bf97b3649d
Merge branch 'PHP-8.0' into PHP-8.1 2022-08-29 22:33:02 +01:00
Jakub Zelenka
3503b1daa2
Fix bug #77780: "Headers already sent" when previous connection was aborted
This change primarily splits SAPI deactivation to module and destroy
parts. The reason is that currently some SAPIs might bail out
on deactivation. One of those SAPI is PHP-FPM that can bail out on
request end if for example the connection is closed by the client
(web sever). The problem is that in such case the resources are not
freed and some values reset. The most visible impact can have not
resetting the PG(headers_sent) which can cause erorrs in the next
request. One such issue is described in #77780 bug which this fixes
and is also cover by a test in this commit. It seems reasonable
to separate deactivation and destroying of the resource which means
that the bail out will not impact it.
2022-08-29 22:25:53 +01:00
Jakub Zelenka
15bca2956b Merge branch 'PHP-8.1' 2022-08-29 16:43:26 +01:00
Jakub Zelenka
7dc3d4b510
Merge branch 'PHP-8.0' into PHP-8.1 2022-08-29 16:42:58 +01:00
Jakub Zelenka
986e7319c5
Re-add fixed tests for GH-8885 2022-08-29 16:42:10 +01:00
Jakub Zelenka
36063873b0
Merge branch 'PHP-8.0' into PHP-8.1 2022-08-29 16:41:19 +01:00
Jakub Zelenka
bcdd9877e1 Fix GH-8885 tests on MacOS 2022-08-29 16:40:31 +01:00
Jakub Zelenka
869ccf17f6
Merge branch 'PHP-8.1' 2022-08-29 14:41:55 +01:00
Jakub Zelenka
be45f540ee
Merge branch 'PHP-8.0' into PHP-8.1 2022-08-29 14:40:57 +01:00
Dmitry Menshikov
f92505cf24
Fix GH-8885: access.log with stderr writes logs to error_log after reload
This fix allows restoring the the original stderr so the logs are
correctly written.
2022-08-29 14:39:24 +01:00
David Carlier
b836007483 Merge branch 'PHP-8.1' 2022-08-28 23:35:46 +01:00
David Carlier
819df032aa Merge branch 'PHP-8.0' into PHP-8.1 2022-08-28 23:33:17 +01:00
David Carlier
e2a5428ca0 FPM fix strict prototype warnings.
Closes GH-8986.
2022-08-28 23:24:23 +01:00
Mikhail Galanin
335979fe1b Add a bit verbosity in FPM logs 2022-08-28 22:35:10 +01:00
Felix Wiedemann
db5f6713ee FPM Downgrade occasional "failed to acquire scoreboard" warning
With request timeouts configured, php-fpm occasionally prints the
following warning:

   WARNING: failed to acquire scoreboard

This is happens when php-fpm checks the child scoreboards for timeouts,
but fails to acquire a lock immediately.  As this can (and does) occur
during normal operation, this commit downgrades this to a notice.
2022-07-18 14:40:39 +01:00
David Carlier
079221b30e Merge branch 'PHP-8.1' 2022-07-18 14:40:07 +01:00
David CARLIER
9a8ae45c4b Revert "FPM: Downgrade occasional "failed to acquire scoreboard" warning"
This reverts commit 3040f75f43.
2022-07-18 14:21:54 +01:00
David CARLIER
2a5b2cca85 Revert "FPM: Downgrade occasional "failed to acquire scoreboard" warning"
This reverts commit 3040f75f43.
2022-07-18 14:21:07 +01:00
David Carlier
d0962859f4 Merge branch 'PHP-8.1' 2022-07-18 12:41:24 +01:00
David Carlier
edb173c200 Merge branch 'PHP-8.0' into PHP-8.1 2022-07-18 12:40:47 +01:00
Felix Wiedemann
3040f75f43 FPM: Downgrade occasional "failed to acquire scoreboard" warning
With request timeouts configured, php-fpm occasionally prints the
following warning:

   WARNING: failed to acquire scoreboard

This is happens when php-fpm checks the child scoreboards for timeouts,
but fails to acquire a lock immediately.  As this can (and does) occur
during normal operation, this commit downgrades this to a notice.
Closes #9019.
2022-07-18 12:40:16 +01:00
Mark Gallagher
327bb21986
FPM: Implement access log filtering
Adds a setting "access.suppress_path" to php-fpm pool configurations
which causes successful GET requests to the specified URIs to be
excluded from the access log. This is to reduce noise caused by
automated health checks.

Requests with response codes outwith the successful range 200 - 299,
requests made with query parameters and requests which have a
Content-Length other than 0 will ignore this setting as a security
precaution.

Closes GH-8174, #80428 [1]

[1] https://bugs.php.net/bug.php?id=80428
2022-07-10 23:21:14 +01:00
David Carlier
6f0dffc89f Merge branch 'PHP-8.1' 2022-07-08 13:13:10 +01:00
David Carlier
9b5a2635d6 Merge branch 'PHP-8.0' into PHP-8.1 2022-07-08 13:12:30 +01:00
Heiko Weber
bd6793372b FPM: Fix possible double free on configuration load failure.
Closes #8948.
2022-07-08 13:11:37 +01:00
David CARLIER
5174ee2353 FPM add routing view global option (for FreeBSD for now).
set the route table FIB id to the sockets created within FPM up to
the max set by the system, avoiding having to use setfib command line.
Closes #8470.
2022-07-08 06:37:47 +01:00
David Carlier
da523060fb Merge branch 'PHP-8.1' 2022-06-27 23:36:54 +01:00
David Carlier
3eead43b6d Merge branch 'PHP-8.0' into PHP-8.1 2022-06-27 23:36:05 +01:00
Heiko Weber
325ca31dcf FPM: zlog, fix free on wrong address for message prepend. 2022-06-27 23:34:58 +01:00
David CARLIER
bf29ee6917 Add reallocarray implementation.
In a similar model as _safe_*alloc api but for the `userland` it guards
against overflow before (re)allocation, usage concealed in fpm for now.
Modern Linux and most of BSD already have it.
Closes #8871.
2022-06-26 13:10:13 +01:00
Jakub Zelenka
305d5e12df
Merge branch 'PHP-8.1' 2022-06-19 20:12:43 +01:00
Jakub Zelenka
b3e6faed48
Merge branch 'PHP-8.0' into PHP-8.1 2022-06-19 20:09:37 +01:00
Jakub Zelenka
e330f443c9
Fix bug #67764: fpm: syslog.ident does not work 2022-06-19 20:05:49 +01:00
David Carlier
f25afaf9ea Merge branch 'PHP-8.1' 2022-06-16 12:44:48 +01:00
David Carlier
75743eaf1b Merge branch 'PHP-8.0' into PHP-8.1 2022-06-16 12:41:51 +01:00
Heiko Weber
a83363e361 FPM: Fix use after free in fpm_evaluate_full_path
Closes #8796.
2022-06-16 12:18:01 +01:00
David CARLIER
daba5fb43f
fpm sockets set listen back queue size to negative which trim down (#8638)
to the SOMAXCONN hard limit on macOs.
2022-05-30 13:12:52 +01:00
Quarkay
312fa05a29 Deal with compiler warning in file sapi/fpm/fpm/fpm_conf.c 2022-05-28 15:57:36 +02:00
Christoph M. Becker
81d1a1b47b
Update bug tracker links
The new php-src bugtracker is on Github.

Closes GH-8277.
2022-05-12 14:55:11 +02:00
Jakub Zelenka
9149d165ee
Merge branch 'PHP-8.1' 2022-05-10 21:40:44 +01:00
Jakub Zelenka
82eea0efc9 Merge branch 'PHP-8.0' into PHP-8.1 2022-05-10 21:39:31 +01:00
Jakub Zelenka
23a2030438 Fix bug #72185: php-fpm writes empty fcgi record causing nginx 502
This issue might happen if there is change of the fcgi stream when
the buffer is full. Then the empty record is created which signals
end of stream which is incorrect.

The actual fix without a test was contributed by GitHub user @loveharmful
in GH-3198.
2022-05-10 21:36:55 +01:00
Jakub Zelenka
6e0a378c8b
Merge branch 'PHP-8.1' 2022-04-29 20:44:35 +01:00
Jakub Zelenka
0332b62c35 Merge branch 'PHP-8.0' into PHP-8.1 2022-04-29 20:41:13 +01:00
David CARLIER
ef06f0f50b
Fix FPM ACL build check on MacOS
MacOS has got ACL support but without user/group support.
2022-04-29 20:39:22 +01:00
George Peter Banyard
b5db594fd2
Refacto php_module_startup() (#8303)
It only ever uses at most 1 additional modules
2022-04-27 23:07:11 +01:00
Jakub Zelenka
09d313daac Merge branch 'PHP-8.1' 2022-04-27 19:17:33 +01:00
Jakub Zelenka
21d551ad0f Merge branch 'PHP-8.0' into PHP-8.1 2022-04-27 19:14:47 +01:00
Jakub Zelenka
0df28869f6 Add skip for FPM resource heavy tests 2022-04-27 19:11:47 +01:00