1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 07:28:09 +02:00
Commit Graph

272 Commits

Author SHA1 Message Date
Jakub Zelenka 5efd60ea90 Merge branch 'PHP-8.2' 2023-03-19 13:17:56 +00: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
Jakub Zelenka 31ccfbd6f6 Merge branch 'PHP-8.2' 2023-03-17 14:57:14 +00:00
Jakub Zelenka 4ac12006ae Merge branch 'PHP-8.1' into PHP-8.2 2023-03-17 14:56:45 +00:00
Jakub Zelenka 7d987ebbbf Fix FPM tester $scriptName logic 2023-03-17 14:55:51 +00:00
Jakub Zelenka 856925ccb4 Merge branch 'PHP-8.2' 2023-03-17 10:45:49 +00:00
Jakub Zelenka e9bbddcdaf Merge branch 'PHP-8.1' into PHP-8.2 2023-03-17 10:45:14 +00:00
Jakub Zelenka 38d2e7ea9a Test FPM FCGI envs with path info fix for Apache proxy pass 2023-03-17 10:42:16 +00:00
Jakub Zelenka 8cf621e0e4 Test FPM FCGI envs with path info fix for Apache proxy handler 2023-03-17 10:42:16 +00:00
Jakub Zelenka b53b0ac2ea Test FPM FCGI envs with path info fix for Apache proxy balancer 2023-03-17 10:42:15 +00:00
Jakub Zelenka 92d2cd5cb8 Test FPM FCGI envs without path info fix for custom source 2023-03-17 10:42:15 +00:00
Jakub Zelenka 3125155b5d Add extra option to FPM tester for handling script filename 2023-03-17 10:42:14 +00:00
Niels Dossche b39ff334a3 Merge branch 'PHP-8.2'
* PHP-8.2:
  Re-add some CTE functions that were removed from being CTE by a mistake
  Fix GH-8065: opcache.consistency_checks > 0 causes segfaults in PHP >= 8.1.5 in fpm context
  Fix GH-8646: Memory leak PHP FPM 8.1
2023-03-07 20:36:41 +01:00
Niels Dossche 7682868dd1 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-8065: opcache.consistency_checks > 0 causes segfaults in PHP >= 8.1.5 in fpm context
  Fix GH-8646: Memory leak PHP FPM 8.1
2023-03-07 20:26:57 +01:00
Niels Dossche ff62d117a3 Fix GH-8646: Memory leak PHP FPM 8.1
Fixes GH-8646
See https://github.com/php/php-src/issues/8646 for thorough discussion.

Interned strings that hold class entries can get a corresponding slot in map_ptr for the CE cache.
map_ptr works like a bump allocator: there is a counter which increases to allocate the next slot in the map.

For class name strings in non-opcache we have:
  - on startup: permanent + interned
  - on request: interned
For class name strings in opcache we have:
  - on startup: permanent + interned
  - on request: either not interned at all, which we can ignore because they won't get a CE cache entry
                or they were already permanent + interned
                or we get a new permanent + interned string in the opcache persistence code

Notice that the map_ptr layout always has the permanent strings first, and the request strings after.
In non-opcache, a request string may get a slot in map_ptr, and that interned request string
gets destroyed at the end of the request. The corresponding map_ptr slot can thereafter never be used again.
This causes map_ptr to keep reallocating to larger and larger sizes.

We solve it as follows:
We can check whether we had any interned request strings, which only happens in non-opcache.
If we have any, we reset map_ptr to the last permanent string.
We can't lose any permanent strings because of map_ptr's layout.

Closes GH-10783.
2023-03-07 20:16:17 +01:00
Remi Collet 6ec4856dc3 Merge branch 'PHP-8.2'
* PHP-8.2:
  more config for new FPM tests
2023-02-14 14:14:52 +01:00
Remi Collet 73b3f78ea0 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  more config for new FPM tests
2023-02-14 14:14:34 +01:00
Remi Collet b11d855dbf Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  more config for new FPM tests
2023-02-14 14:14:03 +01:00
Remi Collet e86d8704b4 more config for new FPM tests 2023-02-14 14:13:40 +01:00
Jakub Zelenka c81b7ce1a3 Merge branch 'PHP-8.2' 2023-02-14 11:07:59 +00:00
Jakub Zelenka cbf089018b Merge branch 'PHP-8.1' into PHP-8.2 2023-02-14 11:00:20 +00:00
Jakub Zelenka 4058d20608 Merge branch 'PHP-8.0' into PHP-8.1 2023-02-14 10:52:17 +00:00
Jakub Zelenka 716de0cff5 Introduce max_multipart_body_parts INI
This fixes GHSA-54hq-v5wp-fqgv DOS vulnerabality by limitting number of
parsed multipart body parts as currently all parts were always parsed.
2023-02-14 10:21:23 +00:00
Jakub Zelenka da4775f071 Merge branch 'PHP-8.2' 2023-01-12 13:55:47 +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 ff42cb0c0e Merge branch 'PHP-8.2' 2022-12-26 14:16:14 +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 2e3d13e555 Merge branch 'PHP-8.2' 2022-12-25 14:50:34 +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 401974ec75 Merge branch 'PHP-8.2' 2022-12-21 12:01:28 +00:00
Jakub Zelenka 891b58d503 Fix bug #77106: Missing separator in FPM FastCGI errors 2022-12-21 12:00:31 +00:00
Jakub Zelenka 2103e0921f Merge branch 'PHP-8.2' 2022-11-23 10:40:52 +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 0a51efe550 Merge branch 'PHP-8.2' 2022-11-22 18:22:18 +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 7666bc5226 Merge branch 'PHP-8.2' 2022-11-13 19:08:28 +00:00
Jakub Zelenka 339bd57f42 Merge branch 'PHP-8.1' into PHP-8.2 2022-11-13 19:06:48 +00:00
Jakub Zelenka b8c1b5e9fa Merge branch 'PHP-8.0' into PHP-8.1 2022-11-13 19:06:10 +00:00
Jakub Zelenka db2d32f476 Introduce TEST_FPM_EXTENSION_DIR for FPM tests with shared extensions 2022-11-13 19:04:43 +00:00
Jakub Zelenka e00dadf43a Merge branch 'PHP-8.2' 2022-10-30 17:02:58 +00:00
Jakub Zelenka 22f25532ed Merge branch 'PHP-8.1' into PHP-8.2 2022-10-30 17:02:32 +00:00
Jakub Zelenka a04a021105 Merge branch 'PHP-8.0' into PHP-8.1 2022-10-30 17:02:08 +00:00
Jakub Zelenka 8229649045 Fix GH-9770: Add small timeout in status-listen test
This is to allow more time to switch for active to idle in scoreboard as
it seems that Travis is quite short on resources and might not switch it
quickly enough.
2022-10-30 17:00:40 +00:00
Dominic H e4a1b80a5f Match FPM status pool's expose_php with parent
If an installed php.ini turns expose_php on/off, and an FPM pool
overrides that with php_flag[expose_php]=off/on, a status pool
created with pm.status_listen in a pool config will have its expose_php
reflect the php.ini value, and not the pool config's override.

This change looks for an override set in
php_flag/php_value/php_admin_flag/php_admin_value and carries that
through.
2022-10-30 15:40:58 +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