php-src/sapi
Tim Düsterhus e3798c2ab9
sapi/cli: Extend --ini to print INI settings changed from the builtin default (#17459)
* sapi/cli: Extend `--ini` to print INI settings changed from the builtin default

This is intended to make it easier to check whether or not a given INI setting
is changed from the default when building reproducers for a bugreport, without
forgetting any that might be relevant to the report.

As an example, running `sapi/cli/php -c /etc/php/8.3/cli/ --ini` on my Ubuntu
will now output:

    Configuration File (php.ini) Path: /usr/local/lib
    Loaded Configuration File:         /etc/php/8.3/cli/php.ini
    Scan for additional .ini files in: (none)
    Additional .ini files parsed:      (none)

    Non-standard INI settings:
    allow_url_include: "0" -> ""
    auto_append_file: (none) -> ""
    auto_prepend_file: (none) -> ""
    display_errors: "1" -> ""
    display_startup_errors: "1" -> ""
    enable_dl: "1" -> ""
    error_reporting: (none) -> "22527"
    html_errors: "1" -> "0"
    ignore_repeated_errors: "0" -> ""
    ignore_repeated_source: "0" -> ""
    implicit_flush: "0" -> "1"
    log_errors: "0" -> "1"
    mail.add_x_header: "0" -> ""
    mail.mixed_lf_and_crlf: "0" -> ""
    max_execution_time: "30" -> "0"
    memory_limit: "128M" -> "-1"
    request_order: (none) -> "GP"
    session.cookie_httponly: "0" -> ""
    session.gc_divisor: "100" -> "1000"
    session.gc_probability: "1" -> "0"
    session.sid_bits_per_character: "4" -> "5"
    session.sid_length: "32" -> "26"
    short_open_tag: "1" -> ""
    unserialize_callback_func: (none) -> ""
    user_dir: (none) -> ""
    variables_order: "EGPCS" -> "GPCS"
    zend.assertions: "1" -> "-1"
    zend.exception_ignore_args: "0" -> "1"
    zend.exception_string_param_max_len: "15" -> "0"

* Improve phrasing

Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>

* NEWS/UPGRADING

---------

Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
2025-02-05 17:54:52 +01:00
..
apache2handler sapi/apache2handler/php_functions.c: No need to rely on argnum (#16143) 2024-09-30 22:09:17 +01:00
cgi sapi: Fix some variable shadowing (#16485) 2024-10-17 22:46:23 +01:00
cli sapi/cli: Extend --ini to print INI settings changed from the builtin default (#17459) 2025-02-05 17:54:52 +01:00
embed Merge branch 'PHP-8.3' into PHP-8.4 2024-12-24 14:38:13 +01:00
fpm Merge branch 'PHP-8.4' 2024-12-27 21:48:58 +01:00
fuzzer Autotools: Sync CS in sapi/fuzzer (#15417) 2024-08-15 11:38:34 +02:00
litespeed Autotools: Sync CS in sapi/litespeed (#15409) 2024-08-14 21:38:36 +02:00
phpdbg Remove more unused local variables (GH-17688) 2025-02-03 20:06:29 +01:00