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

420 Commits

Author SHA1 Message Date
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
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
Alexandre Daubois
ae7def78fb Fix GH-19188: Add support for new INI mail.cr_lf_mode (#19238) 2025-09-08 09:58:27 +02:00
Tim Düsterhus
b27d91993d main: Change the register_argc_argv INI default to Off (#19473)
This partly implements the deprecation of the `register_argc_argv` INI setting
by updating the default value to ensure safe behavior when no INI file is
loaded. The actual deprecation warning will follow separately.

RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_register_argc_argv_ini_directive
2025-08-28 17:39:55 +02:00
Gina Peter Banyard
f4e2e91d4b core: Remove disable_classes INI setting
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#remove_disable_classes_ini_setting

This took longer to merge than expected but the initial motivation from 2 years ago still applied:

As described in the email to the PHP internals list [1] this feature is fundamentally broken and pointless.

Only internal classes can be disable which brings the following observation. On a minimal build of PHP, with only the mandatory extensions enabled, there are 148 classes/interfaces/traits defined. [2]

Other than the SPL ones (and even then), disabling any of these classes will cause issues within the engine.
Moreover, the SPL ones are not a security concern.

Therefore, any other class that can be disabled must come from an extension that can be disabled altogether. And "disabling" a class from an extension without disabling said extension will render it useless anyway.

If a hosting provided is concerned about an extension, then it should not enable it in the first place. Not break it ad hoc.

Considering the above, I cannot see how this functionality was ever useful.

This is in stark contrast to the disable_functions INI setting, which can be used to selectively remove functionality of an extension without breaking it overall.

What makes this setting particularly broken is that it does not unregister the class, it only overwrites the create CE handler to emit a warning and purge the properties and function hashtables. This leads to various use after free, segfaults, and broken expectations for the engine and extensions which define said classes. On top of that, it is possible to actually instantiate such a class (and even classes which actually disallow this like ext/imap) in userland, and pass it to function that are typed against said class without raising a TypeError. However, when trying to do anything with said object stuff is going to explode in countless ways.

[1] https://news-web.php.net/php.internals/120896
[2] https://gist.github.com/Girgias/63d55ba1e50b580412b004046daed02b
2025-08-25 21:16:55 +01:00
Alexandre Daubois
096938fd4a Remove report_memleaks entry from php.ini-* (#19502) 2025-08-16 11:41:03 -07:00
Alexandre Daubois
a84a82ed88 Deprecate disabling report_memleaks INI directive (#19481)
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_report_memleaks_ini_directive
2025-08-16 14:04:34 +02:00
Niels Dossche
1bba07ecc0 partitioned option for setcookie/setrawcookie and sessions
RFC: https://wiki.php.net/rfc/CHIPS

Closes GH-12646.
Closes GH-12652.
2025-08-15 08:41:24 +02:00
Gina Peter Banyard
69f67f990d ext/intl: Deprecate intl.error_level INI setting (#19430)
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_intlerror_level_ini_setting
2025-08-09 16:28:47 +01:00
Frederik Milling Pytlick
4e21924271 Fix GH-17951: Addition of max_memory_limit INI
Closes GH-18011
2025-08-04 16:04:25 +02:00
Arnaud Le Blanc
7b4c14dc10 Make OPcache non-optional
This removes the --enable-opcache/--disable-opcache configure switch. OPcache
is now always builtin. The default value of opcache.enable and
opcache.enable_cli is unchanged.

RFC: https://wiki.php.net/rfc/make_opcache_required

Closes GH-18961.

Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com>
2025-07-27 09:40:22 +02:00
Jakub Zelenka
d0c0a9abfd Introduce OpenSSL INI for selecting libctx (#18768)
Closes GH-18768

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2025-07-14 15:16:14 +02:00
Ilija Tovilo
a402edac1a [skip ci] Add fatal_error_backtraces to php.ini templates (GH-19099) 2025-07-12 19:28:48 +02:00
Jakub Zelenka
5ff8d6d0d2 Fix GH-17645: FPM with httpd ProxyPass does not decode script path
This changes make FPM always decode SCRIPT_FILENAME when Apache
ProxyPass or ProxyPassMatch is used. It also introduces a new INI
option fastcgi.script_path_encoded that allows using the previous
behavior of not decoding the path. The INI is introduced because
there is a chance that some users could use encoded file paths in
their file system as a workaround for the previous behavior.

Close GH-17896
2025-03-25 19:19:55 +01:00
Kamil Tekiela
71edfd70b7 Remove incorrect information from INI (#17020) 2024-12-02 20:02:31 +01:00
hauk92
bc7902d99b Added mysqlnd.collect_memory_statistics to ini quick reference (#16819)
Fixes #16818
Closes #16819
2024-12-02 20:15:38 +09:00
Samuel Melrose
5191581e9c Fix merge of GH-16551
Some commits were mistakenly discarded during the rebase and squash of GH-16551.
2024-11-26 16:35:14 +01:00
Peter Kokot
7f6ad37e5d Sync exif and mbstring INI settings (#16549)
A follow-up of 9ee9c0e674.

The mbstring extension is added as ZEND_MOD_OPTIONAL dependency at
runtime, so INI directives configuration order here is no longer
relevant and can be done in any way.
2024-10-22 14:07:34 +02:00
Michael Voříšek
d313ad6098 Deprecate E_STRICT constant and remove error level
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant

Closes GH-13053
2024-09-18 14:33:14 +02:00
Gina Peter Bnayard
5853cdb73d Use "must not" instead of "cannot" wording 2024-08-21 21:12:17 +01:00
Remi Collet
589cfbb24f Completely remove session.sid_length and session.sid_bits_per_character from INI files (#15382)
see e8ff7c70f9

[timwolla: Adjusted commit message]
2024-08-13 17:04:22 +02:00
Tim Düsterhus
e8ff7c70f9 session: Deprecate session.sid_length and session.sid_bits_per_character (#15213)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
2024-08-04 18:25:31 +02:00
Ayesh Karunaratne
3de3e137bf ext/openssl: Bump minimum required OpenSSL version to 1.1.1
Bumps the minimum required OpenSSL version from 1.0.2 to 1.1.1.

OpenSSL 1.1.1 is an LTS release, but has reached[^1] EOL from upstream. However, Linux distro/OS vendors
continue to ship OpenSSL 1.1.1, so 1.1.1 was picked as the minimum. The current minimum 1.0.2 reached
EOL in 2018.

Bumping the minimum required OpenSSL version makes it possible for ext-openssl to remove a bunch of
conditional code, and assume that TLS 1.3 (shipped with OpenSSL 1.1.1) will be supported everywhere.

 - Debian buster: 1.1.1[^2]
 - Ubuntu 20.04: 1.1.1[^3]
 - CentOS/RHEL 7: 1.0.2
 - RHEL 8/Rocky 8/EL 8: 1.1.1
 - Fedora 38: 3.0.9 (`openssl11` provides OpenSSL 1.1 as well)

RHEL/CentOS 7 reaches EOL mid 2024, so for PHP 8.4 scheduled towards the end of this year, we can safely
bump the minimum OpenSSL version.

[^1]: https://www.openssl.org/blog/blog/2023/03/28/1.1.1-EOL/index.html
[^2]: https://packages.debian.org/buster/libssl-dev
[^3]: https://packages.ubuntu.com/focal/libssl-dev
2024-03-23 15:12:06 +00:00
Derick Rethans
a4d64b2605 Removed ext/oci8 and ext/pdo_oci (#13327)
* Removed ext/oci8 and ext/pdo_oci

They now live in their own repositories:

https://github.com/php/pecl-database-oci8
https://github.com/php/pecl-database-pdo_oci

As per: https://wiki.php.net/rfc/unbundle_imap_pspell_oci8
2024-02-07 15:34:39 +00:00
Derick Rethans
987417e2e0 Remove ext/imap — it has been moved to PECL (#13190)
* Remove ext/imap — it has been moved to PECL

https://pecl.php.net/package/imap

* Remove files related to IMAP

* Remove IMAP CI files and set up

* Also disable IMAP on Circle CI

* Update CREDITS file

* Remove IMAP entry from CODEOWNERS

* Revert "Remove files related to IMAP"

This reverts commit a05ffd6c97.

* Mark IMAP is being removed

* Revert "Remove IMAP CI files and set up"

This reverts commit 82e5ba9910.

* Revert "Also disable IMAP on Circle CI"

This reverts commit e83827b0b2.

* Don't try to build imap extension with CI

* Restore test setup files

* Remove mention of imap in labeler, EXTENSIONS, and sample php.ini files
2024-01-22 12:56:05 +00:00
Sergey Panteleev
b94f9f68a6 Merge branch 'PHP-8.2'
* PHP-8.2:
  Remove `mysqli.reconnect` from php.ini files (#11836)
2023-08-19 22:54:44 +03:00
jrfnl
85661a35f0 Remove mysqli.reconnect from php.ini files (#11836)
The `mysqli.reconnect` ini directive was removed in PHP 8.2.0.
2023-08-19 22:54:21 +03:00
Ilija Tovilo
b2dbf0a2c6 Remove opcache.consistency_checks
This feature has been broken at least since the tracing JIT and inheritance
cache have been introduced. The attempted fix (GH-10798) was too complex. We
have thus decided to remove this feature for now.

Closes GH-11832
2023-08-02 19:22:30 +02:00
George Peter Banyard
3d4ff5ae22 RFC: Deprecate remains of string evaluated code assertions (#11671)
Link: https://wiki.php.net/rfc/assert-string-eval-cleanup
2023-07-13 15:45:32 +01:00
Jakub Zelenka
f2daaeab1e Merge branch 'PHP-8.2' 2023-02-17 13:22:23 +00:00
Jakub Zelenka
a4fe8f7e9f Merge branch 'PHP-8.1' into PHP-8.2 2023-02-17 13:21:56 +00:00
Jakub Zelenka
fd3cc17cbd Add max_multipart_body_parts info into php.ini files 2023-02-17 13:21:18 +00:00
David Carlier
a26bac7150 Merge branch 'PHP-8.2' 2023-02-07 22:52:51 +00:00
David Carlier
ffdd75a282 Merge branch 'PHP-8.1' into PHP-8.2 2023-02-07 22:52:40 +00:00
Max Kellermann
e6281db857 php.ini-production: disable opcache.huge_code_pages by default
There are only very narrow circumstances under which this option has
been reported to provide 1% performance gain due to reduction of TLB
misses.  In many setups, this option only increases memory usage, and
will actually decrease performance.  To avoid this, let's leave it
disabled by default, and let it be an explicit decision to enable it.

For a discussion, see https://github.com/php/php-src/pull/10301

Closes GH-10336
2023-02-07 22:51:55 +00:00
Jakub Zelenka
443eb50a4c Merge branch 'PHP-8.2' 2023-01-19 19:06:38 +00:00
Jakub Zelenka
cc931af35d Fix GH-8086: Introduce mail.mixed_lf_and_crlf INI
When this INI option is enabled, it reverts the line separator for
headers and message to LF which was a non conformant behavior in PHP 7.
It is done because some non conformant MTAs fail to parse CRLF line
separator for headers and body.

This is used for mail and mb_send_mail functions.
2023-01-19 19:05:39 +00:00
Christoph M. Becker
3f3c1df8b6 [ci skip] Fix GH-10056: [grammar] "less security-conscience applications" 2022-12-08 13:38:28 +01:00
Christoph M. Becker
d4c804b98e [ci skip] Add missing entries to php.ini quick reference
Closes GH-9889.
2022-12-01 14:59:28 +01:00
Jakub Zelenka
3871ab2be6 Merge branch 'PHP-8.1' into PHP-8.2 2022-11-24 11:55:17 +00:00
Jakub Zelenka
9416186ff1 Add a note to php.ini-* regarding the required order for GH-8620 2022-11-24 11:54:15 +00:00
Christoph M. Becker
8c0cdd1d6c [ci skip] Remove outdated info from php.ini templates
There is no more need to tell users about PHP 5, or even PHP 4.

Closes GH-9256.
2022-08-05 16:48:08 +02:00
Christoph M. Becker
ce6277986c [ci skip] Add extension=zip to the php.ini templates
The zip extension is now built as shared library by default, so users
want to load it via php.ini.
2022-08-05 16:17:30 +02:00
Christopher Jones
9cd7f41fac Add oci8.prefetch_lob_size 2021-11-12 17:59:22 +11:00
Nikita Popov
469f8a175a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix invalid mbstring config reference

[ci skip]
2021-11-10 09:45:30 +01:00
Petar Obradović
87069d3dcc Fix invalid mbstring config reference
Closes GH-7637.

[ci skip]
2021-11-10 09:44:56 +01:00
ada-u
7eef766c3d Add mysqli.rollback_on_cached_plink to php.ini-* 2021-05-20 15:44:57 +02:00
Michael Voříšek
3ccc0409ce Remove no longer used "log_errors_max_len" ini directive (#6838)
This is a re-application of the original match against master.
The patch was originally applied to master, then reverted from
there, incorrectly applied to PHP-8.0, reverted from there due
to ABI break, and now lands on master again. We can only hope
that it does not get reverted again ;)
2021-05-10 19:26:33 +02:00
Nikita Popov
090627048c Revert "Remove no longer used "log_errors_max_len" ini directive (#6838)"
This reverts commit d2d227e547.

This is an ABI break.
2021-05-08 20:54:53 +02:00
Ben Ramsey
b5d5d06ff3 Revert "Remove no longer used "log_errors_max_len" ini directive (#6838)"
This reverts commit cc2c810dcf.
2021-05-08 13:23:58 -05:00