1
0
mirror of https://github.com/php/php-src.git synced 2026-04-04 14:42:49 +02:00
Commit Graph

845 Commits

Author SHA1 Message Date
Jakub Zelenka
bc30ae4f04 Fix bug #75712: getenv in php-fpm should not read $_ENV, $_SERVER
Closes GH-13195
2024-02-04 11:58:18 +00:00
Jakub Zelenka
b04b09ef56 Fix GH-12996: Incorrect SCRIPT_NAME with Apache ProxyPassMatch when plus in path
Closes GH-13072
2024-01-11 16:47:08 +00:00
Jakub Zelenka
2303e76740 Merge branch 'PHP-8.1' into PHP-8.2 2023-12-01 14:45:48 +00:00
Patrick Prasse
df259f88da Fix bug GH-12705: Segmentation fault in fpm_status_export_to_zval
Closes GH-12706
2023-12-01 14:43:58 +00:00
Jakub Zelenka
882cc4f804 Merge branch 'PHP-8.1' into PHP-8.2 2023-11-03 17:17:23 +00:00
Jakub Zelenka
a8c6c6165b Fix GH-9921: Loading ext in FPM config does not register module handlers
Closes GH-12377
2023-11-03 16:53:09 +00:00
Jakub Zelenka
c776f79578 Merge branch 'PHP-8.1' into PHP-8.2 2023-10-14 18:41:48 +01:00
Jakub Zelenka
0217be4d5b Fix GH-12232: FPM: segfault dynamically loading extension without opcache
Also fixes incorrect assertion in ini init that php_dl is always
temporary.

Closes GH-12277
2023-10-14 18:38:21 +01:00
Jakub Zelenka
1129046482 Merge branch 'PHP-8.1' into PHP-8.2 2023-05-14 12:28:52 +01:00
Jakub Zelenka
4294e8d448 FPM: Fix memory leak for invalid primary script file handle
Closes GH-11088
2023-05-14 12:27:38 +01:00
Jakub Zelenka
90553af15c Merge branch 'PHP-8.1' into PHP-8.2 2023-05-13 18:53:35 +01:00
Jakub Zelenka
5e64ead64a Fix bug #64539: FPM status - query_string not properly JSON encoded
Closes GH-11050
2023-05-13 18:43:30 +01:00
Jakub Zelenka
bda28eb649 Merge branch 'PHP-8.1' into PHP-8.2 2023-05-13 14:14:23 +01:00
Jakub Zelenka
102953735c Fix GH-10461: Postpone FPM child freeing in event loop
This is to prevent after free accessing of the child event that might
happen when child is killed and the message is delivered at that same
time.

Also fixes GH-10889 and properly fixes GH-8517 that was not previously
fixed correctly.
2023-05-13 14:11:42 +01:00
Jakub Zelenka
2b0d29bf17 Merge branch 'PHP-8.1' into PHP-8.2 2023-03-19 13:17:09 +00:00
Jakub Zelenka
0d4d471847 Fix bug #74129: Incorrect SCRIPT_NAME with apache ProxyPassMatch
This happens when there are spaces are in the path info. The reason is
that Apache decodes the path info part in the SCRIPT_NAME as per CGI
RFC. FPM tries to strip path info from the SCRIPT_NAME but the
comparison is done against SCRIPT_FILENAME which is not decoded. For
that to work we have to decode it before comparison if there is any
encoded character.

Closes GH-10869
2023-03-19 13:11:14 +00:00
Niels Dossche
e44b1a916d Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Destroy file_handle in fpm_main
2023-03-18 21:00:21 +01:00
Niels Dossche
f30e71cbde Destroy file_handle in fpm_main
If it's not in the CG(open_files) list, we need to destroy the file
handle ourselves.

Co-authored-by: Jakub Zelenka <bukka@php.net>

Closes GH-10707.
2023-03-18 20:54:46 +01:00
Niels Dossche
6a44705f4e Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10611: fpm_env_init_main leaks environ
2023-03-11 16:35:11 +01:00
Niels Dossche
71c63723c8 Fix GH-10611: fpm_env_init_main leaks environ
Closes GH-10618.
2023-03-11 16:34:41 +01:00
Jakub Zelenka
2b71fa6952 Merge branch 'PHP-8.1' into PHP-8.2 2023-02-05 13:10:19 +00:00
Niels Dossche
5b13e83074 Fix GH-10385: FPM successful config test early exit
This introduces an enum `fpm_init_return_status` to propagate the status
up to fpm_main. This also makes the code clearer by not using magic
integer return numbers.

Closes GH-10388
2023-02-05 13:07:29 +00:00
Jakub Zelenka
aa9b5ed1e4 Merge branch 'PHP-8.1' into PHP-8.2 2023-02-05 12:37:40 +00:00
Jakub Zelenka
4199b72c50 Fix GH-10315: FPM unknown child alert not valid
This changes the log level for an unknown child during wait as this is
not unuasual if FPM master has pid 1 and also possible in some cases
for higher pid processes. Based on that and the fact that this is not
really a problem, there is just a debug level message emitted for pid 1
and for higher pid a warning is emitted.

Closes GH-10319
2023-02-05 12:36:02 +00:00
Jakub Zelenka
1b48a5c802 Fix ASAN reported leak in FPM config test
This happens because config test does not shutdown SAPI.

In addition this commit also fixes few failures when running FPM tests
under root.

Closes GH-10296
2023-01-12 13:52:33 +00:00
Jakub Zelenka
21d8980d27 Fix bug #68591: Configuration test does not perform UID lookups
Addition check in fpm config test to verify existence of user, group,
listen.owner and listen.group.

Closes GH-10165
2022-12-26 14:14:14 +00:00
Jakub Zelenka
e7b6c2efd1 Merge branch 'PHP-8.1' into PHP-8.2 2022-12-25 14:49:45 +00:00
Jakub Zelenka
a3891d9d1a Fix GH-9981: FPM does not reset fastcgi.error_header 2022-12-25 14:44:25 +00:00
Jakub Zelenka
891b58d503 Fix bug #77106: Missing separator in FPM FastCGI errors 2022-12-21 12:00:31 +00:00
Jakub Zelenka
642fcdb781 Merge branch 'PHP-8.1' into PHP-8.2 2022-11-23 11:36:24 +00:00
Jakub Zelenka
c9c1934ff0 Fix GH-8517: FPM child pointer can be potentially uninitialized
There might be a moment when the child log event is executed after
freeing a child. That could possibly happen if the child output is
triggered at the same as the terminating of the child. Then the output
event could be potentially processed after the terminating event which
would cause this kind of issue.

The issue might got more visible after introducing the log_stream on
a child because it is more likely that this cannot be dereferenced
after free. However it is very hard to reproduce this issue so there
is no test for this.

The fix basically prevents passing a child pointer and instead passes
the child PID and then looks the child up by the PID when it is being
processed. This is obviously slower but it is a safe way to do it and
the slow down should not be hopefully visible in a way that it would
overload a master process.
2022-11-23 11:25:51 +00:00
Jakub Zelenka
94702c56e0 Fix bug #80669: FPM numeric user fails to set groups 2022-11-23 10:38:56 +00:00
Jakub Zelenka
70777ecaca Merge branch 'PHP-8.1' into PHP-8.2 2022-11-22 18:21:50 +00:00
Jakub Zelenka
5a4520bc2b Fix bug #68207: Setting fastcgi.error_header can result in a WARNING 2022-11-22 18:17:16 +00:00
Jakub Zelenka
0e7a132918 Merge branch 'PHP-8.1' into PHP-8.2 2022-11-22 18:03:25 +00:00
Jakub Zelenka
31b20f1737 Merge branch 'PHP-8.0' into PHP-8.1 2022-11-22 18:02:11 +00:00
Petr Sumbera
72da2b02e2 php-fpm: fix Solaris port events.mechanism
Closes GH-9959.
2022-11-22 18:01:15 +00:00
Jakub Zelenka
eb9cf18703 Merge branch 'PHP-8.1' into PHP-8.2 2022-10-30 11:46:06 +00:00
Jakub Zelenka
29f7c4613e Merge branch 'PHP-8.0' into PHP-8.1 2022-10-30 11:43:11 +00:00
Jakub Zelenka
1c5844aa3e Fix GH-9754: SaltStack hangs when running php-fpm 8.1.11
SaltStack uses Python subprocess and redirects stderr to stdout which is
then piped to the returned output. If php-fpm starts in daemonized mode,
it should close stderr. However a fix introduced in GH-8913 keeps stderr
around so it can be later restored. That causes the issue reported in
GH-9754. The solution is to keep stderr around only when php-fpm runs in
foreground as the issue is most likely visible only there. Basically
there is no need to restore stderr when php-fpm is daemonized.
2022-10-30 11:41:33 +00:00
Ilija Tovilo
138fd5b3c8 Replace reallocarray with safe_perealloc
Fixes GH-9581
2022-09-29 15:15:40 +02: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