From ef56c2268a8a0bd97c67a4e991e51bd41b68f0d0 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Fri, 1 Mar 2024 01:02:01 +0100 Subject: [PATCH 01/13] Deprecate disabling use_only_cookies --- ext/session/session.c | 28 +++++++++++++++++-- ext/session/tests/015.phpt | 3 ++ ext/session/tests/018.phpt | 3 ++ ext/session/tests/020.phpt | 3 ++ ext/session/tests/021.phpt | 3 ++ ext/session/tests/bug36459.phpt | 3 ++ ext/session/tests/bug41600.phpt | 3 ++ ext/session/tests/bug42596.phpt | 1 + ext/session/tests/bug50308.phpt | 3 ++ ext/session/tests/bug51338.phpt | 1 + ext/session/tests/bug71683.phpt | 1 + ext/session/tests/bug71974.phpt | 4 +++ ext/session/tests/bug72940.phpt | 5 +++- ext/session/tests/bug74892.phpt | 12 +++++--- ext/session/tests/rfc1867.phpt | 2 ++ ext/session/tests/rfc1867_cleanup.phpt | 2 ++ ext/session/tests/rfc1867_disabled.phpt | 2 ++ ext/session/tests/rfc1867_disabled_2.phpt | 2 ++ ext/session/tests/rfc1867_inter.phpt | 2 ++ ext/session/tests/rfc1867_no_name.phpt | 2 ++ ext/session/tests/rfc1867_sid_cookie.phpt | 2 ++ ext/session/tests/rfc1867_sid_get.phpt | 2 ++ ext/session/tests/rfc1867_sid_get_2.phpt | 2 ++ ext/session/tests/rfc1867_sid_invalid.phpt | 2 ++ ext/session/tests/rfc1867_sid_post.phpt | 2 ++ ext/session/tests/session_basic3.phpt | 3 ++ ext/session/tests/session_basic4.phpt | 3 ++ ext/session/tests/session_basic5.phpt | 3 ++ .../tests/general_functions/bug44394_2.phpt | 5 +++- .../output_add_rewrite_var_basic1.phpt | 5 +++- .../output_add_rewrite_var_basic2.phpt | 4 ++- .../output_add_rewrite_var_basic3.phpt | 5 +++- .../output_add_rewrite_var_basic4.phpt | 4 ++- .../url_rewriting_basic1.phpt | 6 +++- .../url_rewriting_basic2.phpt | 6 +++- .../url_rewriting_basic3.phpt | 5 +++- 36 files changed, 129 insertions(+), 15 deletions(-) diff --git a/ext/session/session.c b/ext/session/session.c index 32de7c36d7813..9712b41d1e6f8 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -808,6 +808,30 @@ static PHP_INI_MH(OnUpdateRfc1867Freq) /* {{{ */ return SUCCESS; } /* }}} */ +static PHP_INI_MH(OnUpdateUseOnlyCookies) +{ + SESSION_CHECK_ACTIVE_STATE; + SESSION_CHECK_OUTPUT_STATE; + bool *p = (bool *) ZEND_INI_GET_ADDR(); + *p = zend_ini_parse_bool(new_value); + if (!*p) { + php_error_docref(NULL, E_DEPRECATED, "Disabling session.use_only_cookies INI setting is deprecated"); + } + return SUCCESS; +} + +static PHP_INI_MH(OnUpdateUseTransSid) +{ + SESSION_CHECK_ACTIVE_STATE; + SESSION_CHECK_OUTPUT_STATE; + bool *p = (bool *) ZEND_INI_GET_ADDR(); + *p = zend_ini_parse_bool(new_value); + if (*p) { + php_error_docref(NULL, E_DEPRECATED, "Enabling session.use_trans_sid INI setting is deprecated"); + } + return SUCCESS; +} + /* {{{ PHP_INI */ PHP_INI_BEGIN() STD_PHP_INI_ENTRY("session.save_path", "", PHP_INI_ALL, OnUpdateSaveDir, save_path, php_ps_globals, ps_globals) @@ -825,12 +849,12 @@ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("session.cookie_httponly", "0", PHP_INI_ALL, OnUpdateSessionBool, cookie_httponly, php_ps_globals, ps_globals) STD_PHP_INI_ENTRY("session.cookie_samesite", "", PHP_INI_ALL, OnUpdateSessionString, cookie_samesite, php_ps_globals, ps_globals) STD_PHP_INI_BOOLEAN("session.use_cookies", "1", PHP_INI_ALL, OnUpdateSessionBool, use_cookies, php_ps_globals, ps_globals) - STD_PHP_INI_BOOLEAN("session.use_only_cookies", "1", PHP_INI_ALL, OnUpdateSessionBool, use_only_cookies, php_ps_globals, ps_globals) + STD_PHP_INI_BOOLEAN("session.use_only_cookies", "1", PHP_INI_ALL, OnUpdateUseOnlyCookies, use_only_cookies, php_ps_globals, ps_globals) STD_PHP_INI_BOOLEAN("session.use_strict_mode", "0", PHP_INI_ALL, OnUpdateSessionBool, use_strict_mode, php_ps_globals, ps_globals) STD_PHP_INI_ENTRY("session.referer_check", "", PHP_INI_ALL, OnUpdateSessionString, extern_referer_chk, php_ps_globals, ps_globals) STD_PHP_INI_ENTRY("session.cache_limiter", "nocache", PHP_INI_ALL, OnUpdateSessionString, cache_limiter, php_ps_globals, ps_globals) STD_PHP_INI_ENTRY("session.cache_expire", "180", PHP_INI_ALL, OnUpdateSessionLong, cache_expire, php_ps_globals, ps_globals) - STD_PHP_INI_BOOLEAN("session.use_trans_sid", "0", PHP_INI_ALL, OnUpdateSessionBool, use_trans_sid, php_ps_globals, ps_globals) + STD_PHP_INI_BOOLEAN("session.use_trans_sid", "0", PHP_INI_ALL, OnUpdateUseTransSid, use_trans_sid, php_ps_globals, ps_globals) PHP_INI_ENTRY("session.sid_length", "32", PHP_INI_ALL, OnUpdateSidLength) PHP_INI_ENTRY("session.sid_bits_per_character", "4", PHP_INI_ALL, OnUpdateSidBits) STD_PHP_INI_BOOLEAN("session.lazy_write", "1", PHP_INI_ALL, OnUpdateSessionBool, lazy_write, php_ps_globals, ps_globals) diff --git a/ext/session/tests/015.phpt b/ext/session/tests/015.phpt index 1d6e9d65fe67e..4efd8654a9463 100644 --- a/ext/session/tests/015.phpt +++ b/ext/session/tests/015.phpt @@ -26,4 +26,7 @@ session_start(); session_destroy(); ?> --EXPECT-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/018.phpt b/ext/session/tests/018.phpt index f504f120d6b10..5d9c6eb6261b1 100644 --- a/ext/session/tests/018.phpt +++ b/ext/session/tests/018.phpt @@ -26,4 +26,7 @@ session_start(); session_destroy(); ?> --EXPECT-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0
diff --git a/ext/session/tests/020.phpt b/ext/session/tests/020.phpt index 873973f04bfc5..3fb64dbc076ae 100644 --- a/ext/session/tests/020.phpt +++ b/ext/session/tests/020.phpt @@ -27,4 +27,7 @@ session_start(); session_destroy(); ?> --EXPECT-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/021.phpt b/ext/session/tests/021.phpt index 02f712a9d871e..d7fa98f16244e 100644 --- a/ext/session/tests/021.phpt +++ b/ext/session/tests/021.phpt @@ -60,6 +60,9 @@ ini_set("url_rewriter.tags", "a=href,fieldset=,area=href,frame=src,input=src"); session_destroy(); ?> --EXPECT-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0
diff --git a/ext/session/tests/bug36459.phpt b/ext/session/tests/bug36459.phpt index 201aed60e056e..21a5f62c64312 100644 --- a/ext/session/tests/bug36459.phpt +++ b/ext/session/tests/bug36459.phpt @@ -30,6 +30,9 @@ session_start(); --EXPECTF-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n diff --git a/ext/session/tests/bug41600.phpt b/ext/session/tests/bug41600.phpt index 4181becfef395..09e89e67ea1a8 100644 --- a/ext/session/tests/bug41600.phpt +++ b/ext/session/tests/bug41600.phpt @@ -27,4 +27,7 @@ session_start(); session_destroy(); ?> --EXPECT-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/bug42596.phpt b/ext/session/tests/bug42596.phpt index dca5fc0c99068..c1217384ce850 100644 --- a/ext/session/tests/bug42596.phpt +++ b/ext/session/tests/bug42596.phpt @@ -34,5 +34,6 @@ foreach (glob($sessdir. "*") as $sessfile) { rmdir($sessdir); ?> --EXPECT-- +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 hello world string(6) "100777" diff --git a/ext/session/tests/bug50308.phpt b/ext/session/tests/bug50308.phpt index 414a8354d35fd..920f967d42f9b 100644 --- a/ext/session/tests/bug50308.phpt +++ b/ext/session/tests/bug50308.phpt @@ -25,6 +25,9 @@ session.use_only_cookies=0 --EXPECTF-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/bug51338.phpt b/ext/session/tests/bug51338.phpt index d6a2ddb652746..44d6cface0538 100644 --- a/ext/session/tests/bug51338.phpt +++ b/ext/session/tests/bug51338.phpt @@ -13,6 +13,7 @@ session_start(); print_r(ob_list_handlers()); ?> --EXPECT-- +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 Array ( ) diff --git a/ext/session/tests/bug71683.phpt b/ext/session/tests/bug71683.phpt index 9541121daa3b3..ad4783ee50cc3 100644 --- a/ext/session/tests/bug71683.phpt +++ b/ext/session/tests/bug71683.phpt @@ -14,4 +14,5 @@ ob_start(); echo "ok\n"; ?> --EXPECT-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 ok diff --git a/ext/session/tests/bug71974.phpt b/ext/session/tests/bug71974.phpt index 1c16ab1c24e46..ca3e6d0b326e3 100644 --- a/ext/session/tests/bug71974.phpt +++ b/ext/session/tests/bug71974.phpt @@ -21,3 +21,7 @@ session_start() abc --EXPECT-- abc + +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/bug72940.phpt b/ext/session/tests/bug72940.phpt index 740c5410743f5..81289de0bf831 100644 --- a/ext/session/tests/bug72940.phpt +++ b/ext/session/tests/bug72940.phpt @@ -31,8 +31,11 @@ session_start(); var_dump(session_id(), SID); session_destroy(); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: ini_set(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 6 string(12) "bug72940test" string(0) "" + +Deprecated: ini_set(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 13 string(11) "bug72940get" string(21) "PHPSESSID=bug72940get" diff --git a/ext/session/tests/bug74892.phpt b/ext/session/tests/bug74892.phpt index 793e67cfadd44..ad5550ad225f4 100644 --- a/ext/session/tests/bug74892.phpt +++ b/ext/session/tests/bug74892.phpt @@ -1,15 +1,16 @@ --TEST-- Bug #74892 Url Rewriting (trans_sid) not working on urls that start with # +--INI-- +session.use_cookies=0 +session.use_only_cookies=0 +session.use_trans_sid=1 --EXTENSIONS-- session --SKIPIF-- --FILE-- External link with anchor 2

Internal link

--EXPECT-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0

Click This Anchor Tag!

External link with anchor

External link with anchor 2

diff --git a/ext/session/tests/rfc1867.phpt b/ext/session/tests/rfc1867.phpt index 0962a91bc4fe7..92ece50ce2faa 100644 --- a/ext/session/tests/rfc1867.phpt +++ b/ext/session/tests/rfc1867.phpt @@ -133,3 +133,5 @@ array(5) { } } } + +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_cleanup.phpt b/ext/session/tests/rfc1867_cleanup.phpt index cdfd3c833104b..af25f9b7d5037 100644 --- a/ext/session/tests/rfc1867_cleanup.phpt +++ b/ext/session/tests/rfc1867_cleanup.phpt @@ -87,3 +87,5 @@ array(2) { } } bool(false) + +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_disabled.phpt b/ext/session/tests/rfc1867_disabled.phpt index a928a6171c33c..4d772ae6e4e79 100644 --- a/ext/session/tests/rfc1867_disabled.phpt +++ b/ext/session/tests/rfc1867_disabled.phpt @@ -80,3 +80,5 @@ array(2) { } } bool(false) + +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_disabled_2.phpt b/ext/session/tests/rfc1867_disabled_2.phpt index dcfbe075cbf5b..c261c24d0ff65 100644 --- a/ext/session/tests/rfc1867_disabled_2.phpt +++ b/ext/session/tests/rfc1867_disabled_2.phpt @@ -80,3 +80,5 @@ array(2) { } } bool(false) + +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_inter.phpt b/ext/session/tests/rfc1867_inter.phpt index a7ddff14f5e72..56aae9815c952 100644 --- a/ext/session/tests/rfc1867_inter.phpt +++ b/ext/session/tests/rfc1867_inter.phpt @@ -137,3 +137,5 @@ array(5) { } } bool(false) + +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_no_name.phpt b/ext/session/tests/rfc1867_no_name.phpt index d6a771baf2164..83730b0cc0004 100644 --- a/ext/session/tests/rfc1867_no_name.phpt +++ b/ext/session/tests/rfc1867_no_name.phpt @@ -80,3 +80,5 @@ array(2) { } } bool(false) + +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_sid_cookie.phpt b/ext/session/tests/rfc1867_sid_cookie.phpt index e090ebec5d6e6..bd872adcd2fe3 100644 --- a/ext/session/tests/rfc1867_sid_cookie.phpt +++ b/ext/session/tests/rfc1867_sid_cookie.phpt @@ -132,3 +132,5 @@ array(5) { } } } + +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_sid_get.phpt b/ext/session/tests/rfc1867_sid_get.phpt index f227dd7d34300..ee9a5c14ac366 100644 --- a/ext/session/tests/rfc1867_sid_get.phpt +++ b/ext/session/tests/rfc1867_sid_get.phpt @@ -130,3 +130,5 @@ array(5) { } } } + +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_sid_get_2.phpt b/ext/session/tests/rfc1867_sid_get_2.phpt index 8362f3b58d480..da8696f0cb0b8 100644 --- a/ext/session/tests/rfc1867_sid_get_2.phpt +++ b/ext/session/tests/rfc1867_sid_get_2.phpt @@ -132,3 +132,5 @@ array(5) { } } } + +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_sid_invalid.phpt b/ext/session/tests/rfc1867_sid_invalid.phpt index fe01b5a8ba2aa..53d90e9b40c4b 100644 --- a/ext/session/tests/rfc1867_sid_invalid.phpt +++ b/ext/session/tests/rfc1867_sid_invalid.phpt @@ -144,3 +144,5 @@ array(5) { } } } + +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_sid_post.phpt b/ext/session/tests/rfc1867_sid_post.phpt index e1f2123b56a58..192fd2d8a0984 100644 --- a/ext/session/tests/rfc1867_sid_post.phpt +++ b/ext/session/tests/rfc1867_sid_post.phpt @@ -128,3 +128,5 @@ array(5) { } } } + +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/session_basic3.phpt b/ext/session/tests/session_basic3.phpt index 661f48546d123..7ddeffaa48d37 100644 --- a/ext/session/tests/session_basic3.phpt +++ b/ext/session/tests/session_basic3.phpt @@ -222,6 +222,9 @@ var_dump(session_destroy()); ob_end_flush(); ?> --EXPECT-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 *** Testing basic session functionality : variation3 use_trans_sid *** *** Test trans sid *** diff --git a/ext/session/tests/session_basic4.phpt b/ext/session/tests/session_basic4.phpt index 93b04604d24d4..d1c8cdcd95928 100644 --- a/ext/session/tests/session_basic4.phpt +++ b/ext/session/tests/session_basic4.phpt @@ -48,6 +48,9 @@ echo ' '; ?> --EXPECT-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 *** Testing basic session functionality : variation4 use_trans_sid *** *** Test trans sid *** diff --git a/ext/session/tests/session_basic5.phpt b/ext/session/tests/session_basic5.phpt index 4f1d39ee02701..b8692d64cb2a5 100644 --- a/ext/session/tests/session_basic5.phpt +++ b/ext/session/tests/session_basic5.phpt @@ -235,6 +235,9 @@ var_dump(session_destroy()); ob_end_flush(); ?> --EXPECT-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 *** Testing basic session functionality : variation5 use_trans_sid *** *** Test trans sid *** diff --git a/ext/standard/tests/general_functions/bug44394_2.phpt b/ext/standard/tests/general_functions/bug44394_2.phpt index 356291318c8ba..c6107def029da 100644 --- a/ext/standard/tests/general_functions/bug44394_2.phpt +++ b/ext/standard/tests/general_functions/bug44394_2.phpt @@ -5,12 +5,12 @@ session --INI-- session.name=PHPSESSID session.use_only_cookies=0 +session.use_trans_sid=1 session.trans_sid_tags="a=href,area=href,frame=src,form=" url_rewriter.tags="a=href,area=href,frame=src,form=" --FILE-- --EXPECTF-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 asd diff --git a/ext/standard/tests/general_functions/output_add_rewrite_var_basic1.phpt b/ext/standard/tests/general_functions/output_add_rewrite_var_basic1.phpt index 007772f408a3f..88c4af981b1dd 100644 --- a/ext/standard/tests/general_functions/output_add_rewrite_var_basic1.phpt +++ b/ext/standard/tests/general_functions/output_add_rewrite_var_basic1.phpt @@ -74,7 +74,8 @@ Test use_trans_sid=1
---EXPECT-- +--EXPECTF-- +Deprecated: ini_set(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 6 Without session @@ -105,6 +106,8 @@ Test use_trans_sid=0
+ +Deprecated: ini_set(): Enabling session.use_trans_sid INI setting is deprecated in %s on line 50 Test use_trans_sid=1 diff --git a/ext/standard/tests/general_functions/output_add_rewrite_var_basic2.phpt b/ext/standard/tests/general_functions/output_add_rewrite_var_basic2.phpt index 3aba659c34387..ea15f9e12f85c 100644 --- a/ext/standard/tests/general_functions/output_add_rewrite_var_basic2.phpt +++ b/ext/standard/tests/general_functions/output_add_rewrite_var_basic2.phpt @@ -74,7 +74,7 @@ Test use_trans_sid=1
---EXPECT-- +--EXPECTF-- Without session @@ -105,6 +105,8 @@ Test use_trans_sid=0 + +Deprecated: ini_set(): Enabling session.use_trans_sid INI setting is deprecated in %s on line 50 Test use_trans_sid=1 diff --git a/ext/standard/tests/general_functions/output_add_rewrite_var_basic3.phpt b/ext/standard/tests/general_functions/output_add_rewrite_var_basic3.phpt index 92cd59e4f458e..7a407f9e1caa6 100644 --- a/ext/standard/tests/general_functions/output_add_rewrite_var_basic3.phpt +++ b/ext/standard/tests/general_functions/output_add_rewrite_var_basic3.phpt @@ -73,7 +73,8 @@ Test use_trans_sid=1 ---EXPECT-- +--EXPECTF-- +Deprecated: ini_set(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 5 Without session @@ -104,6 +105,8 @@ Test use_trans_sid=0 + +Deprecated: ini_set(): Enabling session.use_trans_sid INI setting is deprecated in %s on line 49 Test use_trans_sid=1 diff --git a/ext/standard/tests/general_functions/output_add_rewrite_var_basic4.phpt b/ext/standard/tests/general_functions/output_add_rewrite_var_basic4.phpt index 7dc1ecaa4b7d4..ae7f7a979e672 100644 --- a/ext/standard/tests/general_functions/output_add_rewrite_var_basic4.phpt +++ b/ext/standard/tests/general_functions/output_add_rewrite_var_basic4.phpt @@ -73,7 +73,7 @@ Test use_trans_sid=1 ---EXPECT-- +--EXPECTF-- Without session @@ -104,6 +104,8 @@ Test use_trans_sid=0 + +Deprecated: ini_set(): Enabling session.use_trans_sid INI setting is deprecated in %s on line 49 Test use_trans_sid=1 diff --git a/ext/standard/tests/general_functions/url_rewriting_basic1.phpt b/ext/standard/tests/general_functions/url_rewriting_basic1.phpt index 4c1f6784dcb2c..4a5d1b73da779 100644 --- a/ext/standard/tests/general_functions/url_rewriting_basic1.phpt +++ b/ext/standard/tests/general_functions/url_rewriting_basic1.phpt @@ -76,7 +76,7 @@ session_start(); echo "\nURL-Rewriting with transparent session id support without output_add_rewrite_var()\n"; echo $testTags; ---EXPECT-- +--EXPECTF-- URL-Rewriting with output_add_rewrite_var() without transparent session id support @@ -115,6 +115,10 @@ URL-Rewriting with output_add_rewrite_var() without transparent session id suppo
+Deprecated: ini_set(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 60 + +Deprecated: ini_set(): Enabling session.use_trans_sid INI setting is deprecated in %s on line 63 + URL-Rewriting with transparent session id support without output_add_rewrite_var() diff --git a/ext/standard/tests/general_functions/url_rewriting_basic2.phpt b/ext/standard/tests/general_functions/url_rewriting_basic2.phpt index 635383a33c913..c5b05405da31c 100644 --- a/ext/standard/tests/general_functions/url_rewriting_basic2.phpt +++ b/ext/standard/tests/general_functions/url_rewriting_basic2.phpt @@ -87,7 +87,7 @@ output_add_rewrite_var('', ''); echo "\nURL-Rewriting with output_add_rewrite_var() without transparent session id support\n"; echo $testTags; ---EXPECT-- +--EXPECTF-- URL-Rewriting with output_add_rewrite_var() without transparent session id support @@ -126,6 +126,10 @@ URL-Rewriting with output_add_rewrite_var() without transparent session id suppo
+Deprecated: ini_set(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 61 + +Deprecated: ini_set(): Enabling session.use_trans_sid INI setting is deprecated in %s on line 64 + URL-Rewriting with transparent session id support without output_add_rewrite_var() diff --git a/ext/standard/tests/general_functions/url_rewriting_basic3.phpt b/ext/standard/tests/general_functions/url_rewriting_basic3.phpt index edf41ba4fe200..0b31568918778 100644 --- a/ext/standard/tests/general_functions/url_rewriting_basic3.phpt +++ b/ext/standard/tests/general_functions/url_rewriting_basic3.phpt @@ -80,7 +80,10 @@ output_add_rewrite_var('', ''); echo "\nURL-Rewriting with transparent session id support without output_add_rewrite_var()\n"; echo $testTags; ---EXPECT-- +--EXPECTF-- +Deprecated: ini_set(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 47 + +Deprecated: ini_set(): Enabling session.use_trans_sid INI setting is deprecated in %s on line 50 URL-Rewriting with transparent session id support without output_add_rewrite_var() From 6faf1a7e03956cf80fa54530a9ba0b65b7f73531 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Fri, 5 Apr 2024 20:59:25 +0200 Subject: [PATCH 02/13] Add a new test to check new deprecations --- ext/session/session.c | 12 +++++- ext/session/tests/deprecations.phpt | 58 +++++++++++++++++++++++++++++ ext/standard/url_scanner_ex.re | 6 +++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 ext/session/tests/deprecations.phpt diff --git a/ext/session/session.c b/ext/session/session.c index 9712b41d1e6f8..53ab75e1d1e23 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -832,6 +832,16 @@ static PHP_INI_MH(OnUpdateUseTransSid) return SUCCESS; } +static PHP_INI_MH(OnUpdateRefererCheck) +{ + SESSION_CHECK_ACTIVE_STATE; + SESSION_CHECK_OUTPUT_STATE; + if (strcmp("", ZSTR_VAL(new_value)) != 0) { + php_error_docref(NULL, E_DEPRECATED, "Usage of session.referer_check INI setting is deprecated"); + } + return OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); +} + /* {{{ PHP_INI */ PHP_INI_BEGIN() STD_PHP_INI_ENTRY("session.save_path", "", PHP_INI_ALL, OnUpdateSaveDir, save_path, php_ps_globals, ps_globals) @@ -851,7 +861,7 @@ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("session.use_cookies", "1", PHP_INI_ALL, OnUpdateSessionBool, use_cookies, php_ps_globals, ps_globals) STD_PHP_INI_BOOLEAN("session.use_only_cookies", "1", PHP_INI_ALL, OnUpdateUseOnlyCookies, use_only_cookies, php_ps_globals, ps_globals) STD_PHP_INI_BOOLEAN("session.use_strict_mode", "0", PHP_INI_ALL, OnUpdateSessionBool, use_strict_mode, php_ps_globals, ps_globals) - STD_PHP_INI_ENTRY("session.referer_check", "", PHP_INI_ALL, OnUpdateSessionString, extern_referer_chk, php_ps_globals, ps_globals) + STD_PHP_INI_ENTRY("session.referer_check", "", PHP_INI_ALL, OnUpdateRefererCheck, extern_referer_chk, php_ps_globals, ps_globals) STD_PHP_INI_ENTRY("session.cache_limiter", "nocache", PHP_INI_ALL, OnUpdateSessionString, cache_limiter, php_ps_globals, ps_globals) STD_PHP_INI_ENTRY("session.cache_expire", "180", PHP_INI_ALL, OnUpdateSessionLong, cache_expire, php_ps_globals, ps_globals) STD_PHP_INI_BOOLEAN("session.use_trans_sid", "0", PHP_INI_ALL, OnUpdateUseTransSid, use_trans_sid, php_ps_globals, ps_globals) diff --git a/ext/session/tests/deprecations.phpt b/ext/session/tests/deprecations.phpt new file mode 100644 index 0000000000000..60f0c5ce49f55 --- /dev/null +++ b/ext/session/tests/deprecations.phpt @@ -0,0 +1,58 @@ +--TEST-- +Deprecated GET/POST sessions +--EXTENSIONS-- +session +--SKIPIF-- + +--INI-- +session.use_cookies=0 +session.use_only_cookies=1 +session.use_trans_sid=0 +--FILE-- + '0', 'use_only_cookies' => '0', 'use_trans_sid' => '1']); +?> +--EXPECTF-- +Deprecated: ini_set(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 6 + +Deprecated: ini_set(): Enabling session.use_trans_sid INI setting is deprecated in %s on line 11 + +Deprecated: ini_set(): Usage of session.trans_sid_tags INI setting is deprecated in %s on line 16 + +Deprecated: ini_set(): Usage of session.trans_sid_hosts INI setting is deprecated in %s on line 21 + +Deprecated: ini_set(): Usage of session.referer_check INI setting is deprecated in %s on line 26 + +Deprecated: session_start(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 32 + +Deprecated: session_start(): Enabling session.use_trans_sid INI setting is deprecated in %s on line 32 diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re index 305be39d8780f..fabfa34d57e26 100644 --- a/ext/standard/url_scanner_ex.re +++ b/ext/standard/url_scanner_ex.re @@ -102,6 +102,9 @@ static zend_result php_ini_on_update_tags(zend_ini_entry *entry, zend_string *ne static PHP_INI_MH(OnUpdateSessionTags) { + if (strcmp("a=href,area=href,frame=src,form=", ZSTR_VAL(new_value)) != 0) { + php_error_docref(NULL, E_DEPRECATED, "Usage of session.trans_sid_tags INI setting is deprecated"); + } return php_ini_on_update_tags(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, /* is_session */ true); } @@ -152,6 +155,9 @@ static zend_result php_ini_on_update_hosts(zend_ini_entry *entry, zend_string *n static PHP_INI_MH(OnUpdateSessionHosts) { + if (strcmp("", ZSTR_VAL(new_value)) != 0) { + php_error_docref(NULL, E_DEPRECATED, "Usage of session.trans_sid_hosts INI setting is deprecated"); + } return php_ini_on_update_hosts(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, /* is_session */ true); } From b7ac0272a0fb885d982e0ef52ff1aa105f0746f6 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Fri, 3 May 2024 12:59:44 +0200 Subject: [PATCH 03/13] Deprecate SID --- ext/session/session.c | 4 ++-- ext/session/tests/deprecations.phpt | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ext/session/session.c b/ext/session/session.c index 53ab75e1d1e23..fd88d9d2c3f5c 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1512,7 +1512,7 @@ PHPAPI zend_result php_session_reset_id(void) /* {{{ */ zval_ptr_dtor_str(sid); ZVAL_STR(sid, smart_str_extract(&var)); } else { - REGISTER_STRINGL_CONSTANT("SID", ZSTR_VAL(var.s), ZSTR_LEN(var.s), 0); + REGISTER_STRINGL_CONSTANT("SID", ZSTR_VAL(var.s), ZSTR_LEN(var.s), CONST_DEPRECATED); smart_str_free(&var); } } else { @@ -1520,7 +1520,7 @@ PHPAPI zend_result php_session_reset_id(void) /* {{{ */ zval_ptr_dtor_str(sid); ZVAL_EMPTY_STRING(sid); } else { - REGISTER_STRINGL_CONSTANT("SID", "", 0, 0); + REGISTER_STRINGL_CONSTANT("SID", "", 0, CONST_DEPRECATED); } } diff --git a/ext/session/tests/deprecations.phpt b/ext/session/tests/deprecations.phpt index 60f0c5ce49f55..2d995432da138 100644 --- a/ext/session/tests/deprecations.phpt +++ b/ext/session/tests/deprecations.phpt @@ -41,6 +41,9 @@ ini_set("session.referer_check", ""); // Setting deprecated values directly in session_start() // Expecting deprecation here session_start([ 'use_cookies' => '0', 'use_only_cookies' => '0', 'use_trans_sid' => '1']); + +echo SID; + ?> --EXPECTF-- Deprecated: ini_set(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 6 @@ -56,3 +59,6 @@ Deprecated: ini_set(): Usage of session.referer_check INI setting is deprecated Deprecated: session_start(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 32 Deprecated: session_start(): Enabling session.use_trans_sid INI setting is deprecated in %s on line 32 + +Deprecated: Constant SID is deprecated in %s on line 34 +PHPSESSID=%s \ No newline at end of file From 8f38971d9659a3b63e849f514f1d4a29e51a842e Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Fri, 3 May 2024 13:18:43 +0200 Subject: [PATCH 04/13] Update test cases --- ext/session/tests/015.phpt | 7 +++++-- ext/session/tests/021.phpt | 4 +++- ext/session/tests/bug72940.phpt | 4 ++++ ext/session/tests/bug74892.phpt | 5 ++++- ext/session/tests/gh13891.phpt | 11 ++++++++++- ext/session/tests/session_basic5.phpt | 4 +++- .../output_add_rewrite_var_basic1.phpt | 2 ++ .../output_add_rewrite_var_basic2.phpt | 1 + .../tests/general_functions/url_rewriting_basic1.phpt | 1 + .../tests/general_functions/url_rewriting_basic2.phpt | 1 + .../tests/general_functions/url_rewriting_basic3.phpt | 2 ++ 11 files changed, 36 insertions(+), 6 deletions(-) diff --git a/ext/session/tests/015.phpt b/ext/session/tests/015.phpt index 4efd8654a9463..3154022fae861 100644 --- a/ext/session/tests/015.phpt +++ b/ext/session/tests/015.phpt @@ -20,13 +20,16 @@ error_reporting(E_ALL); session_id("test015"); session_start(); +$sid = SID; ?> - + ---EXPECT-- +--EXPECTF-- Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 + +Deprecated: Constant SID is deprecated in %s on line 6 diff --git a/ext/session/tests/021.phpt b/ext/session/tests/021.phpt index d7fa98f16244e..00d5779adf421 100644 --- a/ext/session/tests/021.phpt +++ b/ext/session/tests/021.phpt @@ -59,10 +59,12 @@ ini_set("url_rewriter.tags", "a=href,fieldset=,area=href,frame=src,input=src"); session_destroy(); ?> ---EXPECT-- +--EXPECTF-- Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 + +Deprecated: ini_set(): Usage of session.trans_sid_hosts INI setting is deprecated in %s on line 4
diff --git a/ext/session/tests/bug72940.phpt b/ext/session/tests/bug72940.phpt index 81289de0bf831..9a927a5419e4a 100644 --- a/ext/session/tests/bug72940.phpt +++ b/ext/session/tests/bug72940.phpt @@ -33,9 +33,13 @@ session_destroy(); ?> --EXPECTF-- Deprecated: ini_set(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 6 + +Deprecated: Constant SID is deprecated in %s on line 8 string(12) "bug72940test" string(0) "" Deprecated: ini_set(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 13 + +Deprecated: Constant SID is deprecated in %s on line 15 string(11) "bug72940get" string(21) "PHPSESSID=bug72940get" diff --git a/ext/session/tests/bug74892.phpt b/ext/session/tests/bug74892.phpt index ad5550ad225f4..916120cb4d447 100644 --- a/ext/session/tests/bug74892.phpt +++ b/ext/session/tests/bug74892.phpt @@ -10,6 +10,7 @@ session --FILE-- External link with anchor

External link with anchor 2

Internal link

---EXPECT-- +--EXPECTF-- Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 + +Deprecated: ini_set(): Usage of session.trans_sid_hosts INI setting is deprecated in %s on line 3

Click This Anchor Tag!

External link with anchor

External link with anchor 2

diff --git a/ext/session/tests/gh13891.phpt b/ext/session/tests/gh13891.phpt index 7df9bffa770bc..97c0bfd617b70 100644 --- a/ext/session/tests/gh13891.phpt +++ b/ext/session/tests/gh13891.phpt @@ -14,4 +14,13 @@ session // We *must* set it here because the bug only triggers on a runtime edit ini_set('session.trans_sid_hosts','php.net'); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 + +Deprecated: PHP Startup: Usage of session.trans_sid_hosts INI setting is deprecated in Unknown on line 0 + +Deprecated: ini_set(): Usage of session.trans_sid_hosts INI setting is deprecated in %s on line 3 + +Deprecated: PHP Request Shutdown: Usage of session.trans_sid_hosts INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/session_basic5.phpt b/ext/session/tests/session_basic5.phpt index b8692d64cb2a5..dd029b8aeeb7b 100644 --- a/ext/session/tests/session_basic5.phpt +++ b/ext/session/tests/session_basic5.phpt @@ -234,10 +234,12 @@ var_dump(session_destroy()); ob_end_flush(); ?> ---EXPECT-- +--EXPECTF-- Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 + +Deprecated: ini_set(): Usage of session.trans_sid_hosts INI setting is deprecated in %s on line 5 *** Testing basic session functionality : variation5 use_trans_sid *** *** Test trans sid *** diff --git a/ext/standard/tests/general_functions/output_add_rewrite_var_basic1.phpt b/ext/standard/tests/general_functions/output_add_rewrite_var_basic1.phpt index 88c4af981b1dd..62ef24429b211 100644 --- a/ext/standard/tests/general_functions/output_add_rewrite_var_basic1.phpt +++ b/ext/standard/tests/general_functions/output_add_rewrite_var_basic1.phpt @@ -75,6 +75,8 @@ Test use_trans_sid=1
--EXPECTF-- +Deprecated: ini_set(): Usage of session.trans_sid_hosts INI setting is deprecated in %s on line 5 + Deprecated: ini_set(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 6 Without session diff --git a/ext/standard/tests/general_functions/output_add_rewrite_var_basic2.phpt b/ext/standard/tests/general_functions/output_add_rewrite_var_basic2.phpt index ea15f9e12f85c..3f133669ad57a 100644 --- a/ext/standard/tests/general_functions/output_add_rewrite_var_basic2.phpt +++ b/ext/standard/tests/general_functions/output_add_rewrite_var_basic2.phpt @@ -75,6 +75,7 @@ Test use_trans_sid=1
--EXPECTF-- +Deprecated: ini_set(): Usage of session.trans_sid_hosts INI setting is deprecated in %s on line 5 Without session diff --git a/ext/standard/tests/general_functions/url_rewriting_basic1.phpt b/ext/standard/tests/general_functions/url_rewriting_basic1.phpt index 4a5d1b73da779..0bc3a64573ce2 100644 --- a/ext/standard/tests/general_functions/url_rewriting_basic1.phpt +++ b/ext/standard/tests/general_functions/url_rewriting_basic1.phpt @@ -77,6 +77,7 @@ echo "\nURL-Rewriting with transparent session id support without output_add_rew echo $testTags; --EXPECTF-- +Deprecated: ini_set(): Usage of session.trans_sid_hosts INI setting is deprecated in %s on line 44 URL-Rewriting with output_add_rewrite_var() without transparent session id support diff --git a/ext/standard/tests/general_functions/url_rewriting_basic2.phpt b/ext/standard/tests/general_functions/url_rewriting_basic2.phpt index c5b05405da31c..bed24209eee7c 100644 --- a/ext/standard/tests/general_functions/url_rewriting_basic2.phpt +++ b/ext/standard/tests/general_functions/url_rewriting_basic2.phpt @@ -88,6 +88,7 @@ echo "\nURL-Rewriting with output_add_rewrite_var() without transparent session echo $testTags; --EXPECTF-- +Deprecated: ini_set(): Usage of session.trans_sid_hosts INI setting is deprecated in %s on line 44 URL-Rewriting with output_add_rewrite_var() without transparent session id support diff --git a/ext/standard/tests/general_functions/url_rewriting_basic3.phpt b/ext/standard/tests/general_functions/url_rewriting_basic3.phpt index 0b31568918778..7a2eed0823d9f 100644 --- a/ext/standard/tests/general_functions/url_rewriting_basic3.phpt +++ b/ext/standard/tests/general_functions/url_rewriting_basic3.phpt @@ -81,6 +81,8 @@ echo "\nURL-Rewriting with transparent session id support without output_add_rew echo $testTags; --EXPECTF-- +Deprecated: ini_set(): Usage of session.trans_sid_hosts INI setting is deprecated in %s on line 44 + Deprecated: ini_set(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 47 Deprecated: ini_set(): Enabling session.use_trans_sid INI setting is deprecated in %s on line 50 From 76bd982b47a269d83659958ff4abfad93d57b802 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Fri, 3 May 2024 17:07:19 +0200 Subject: [PATCH 05/13] Fix failing windows tests --- ext/session/tests/bug71974.phpt | 1 + ext/session/tests/rfc1867.phpt | 1 + ext/session/tests/rfc1867_cleanup.phpt | 1 + ext/session/tests/rfc1867_disabled.phpt | 1 + ext/session/tests/rfc1867_disabled_2.phpt | 1 + ext/session/tests/rfc1867_inter.phpt | 1 + ext/session/tests/rfc1867_no_name.phpt | 1 + ext/session/tests/rfc1867_sid_cookie.phpt | 1 + ext/session/tests/rfc1867_sid_get.phpt | 1 + ext/session/tests/rfc1867_sid_get_2.phpt | 1 + ext/session/tests/rfc1867_sid_invalid.phpt | 1 + ext/session/tests/rfc1867_sid_post.phpt | 1 + 12 files changed, 12 insertions(+) diff --git a/ext/session/tests/bug71974.phpt b/ext/session/tests/bug71974.phpt index ca3e6d0b326e3..9e441e0db10ee 100644 --- a/ext/session/tests/bug71974.phpt +++ b/ext/session/tests/bug71974.phpt @@ -5,6 +5,7 @@ session --SKIPIF-- --INI-- +error_reporting=-1 session.save_handler=files session.auto_start=0 session.use_cookies=1 diff --git a/ext/session/tests/rfc1867.phpt b/ext/session/tests/rfc1867.phpt index 92ece50ce2faa..59f64c4ffe7e4 100644 --- a/ext/session/tests/rfc1867.phpt +++ b/ext/session/tests/rfc1867.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 --INI-- +error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_cleanup.phpt b/ext/session/tests/rfc1867_cleanup.phpt index af25f9b7d5037..5f08b575a9ca2 100644 --- a/ext/session/tests/rfc1867_cleanup.phpt +++ b/ext/session/tests/rfc1867_cleanup.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 --INI-- +error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_disabled.phpt b/ext/session/tests/rfc1867_disabled.phpt index 4d772ae6e4e79..caae8813f1118 100644 --- a/ext/session/tests/rfc1867_disabled.phpt +++ b/ext/session/tests/rfc1867_disabled.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 disabled --INI-- +error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_disabled_2.phpt b/ext/session/tests/rfc1867_disabled_2.phpt index c261c24d0ff65..8858c30aa549d 100644 --- a/ext/session/tests/rfc1867_disabled_2.phpt +++ b/ext/session/tests/rfc1867_disabled_2.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 disabled 2 --INI-- +error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_inter.phpt b/ext/session/tests/rfc1867_inter.phpt index 56aae9815c952..44363e964cd5a 100644 --- a/ext/session/tests/rfc1867_inter.phpt +++ b/ext/session/tests/rfc1867_inter.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 --INI-- +error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_no_name.phpt b/ext/session/tests/rfc1867_no_name.phpt index 83730b0cc0004..a699f93e29d49 100644 --- a/ext/session/tests/rfc1867_no_name.phpt +++ b/ext/session/tests/rfc1867_no_name.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 no name --INI-- +error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_sid_cookie.phpt b/ext/session/tests/rfc1867_sid_cookie.phpt index bd872adcd2fe3..19bd819f745c6 100644 --- a/ext/session/tests/rfc1867_sid_cookie.phpt +++ b/ext/session/tests/rfc1867_sid_cookie.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 sid cookie --INI-- +error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_sid_get.phpt b/ext/session/tests/rfc1867_sid_get.phpt index ee9a5c14ac366..b12eab66058fd 100644 --- a/ext/session/tests/rfc1867_sid_get.phpt +++ b/ext/session/tests/rfc1867_sid_get.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 sid get --INI-- +error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_sid_get_2.phpt b/ext/session/tests/rfc1867_sid_get_2.phpt index da8696f0cb0b8..6871e49914311 100644 --- a/ext/session/tests/rfc1867_sid_get_2.phpt +++ b/ext/session/tests/rfc1867_sid_get_2.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 sid get 2 --INI-- +error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_sid_invalid.phpt b/ext/session/tests/rfc1867_sid_invalid.phpt index 53d90e9b40c4b..7c1c9a7e5a806 100644 --- a/ext/session/tests/rfc1867_sid_invalid.phpt +++ b/ext/session/tests/rfc1867_sid_invalid.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 sid cookie --INI-- +error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_sid_post.phpt b/ext/session/tests/rfc1867_sid_post.phpt index 192fd2d8a0984..656d3a7793d06 100644 --- a/ext/session/tests/rfc1867_sid_post.phpt +++ b/ext/session/tests/rfc1867_sid_post.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 sid post --INI-- +error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= From a7530e7a423d483c15c45188625b83c9074d3a4a Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Sat, 4 May 2024 16:19:45 +0200 Subject: [PATCH 06/13] Review comments --- ext/session/session.c | 2 +- ext/session/tests/deprecations.phpt | 2 +- ext/standard/url_scanner_ex.re | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/session/session.c b/ext/session/session.c index fd88d9d2c3f5c..ac8e4ba88f8f7 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -836,7 +836,7 @@ static PHP_INI_MH(OnUpdateRefererCheck) { SESSION_CHECK_ACTIVE_STATE; SESSION_CHECK_OUTPUT_STATE; - if (strcmp("", ZSTR_VAL(new_value)) != 0) { + if (ZSTR_LEN(new_value) != 0) { php_error_docref(NULL, E_DEPRECATED, "Usage of session.referer_check INI setting is deprecated"); } return OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); diff --git a/ext/session/tests/deprecations.phpt b/ext/session/tests/deprecations.phpt index 2d995432da138..4a2337fb99dad 100644 --- a/ext/session/tests/deprecations.phpt +++ b/ext/session/tests/deprecations.phpt @@ -61,4 +61,4 @@ Deprecated: session_start(): Disabling session.use_only_cookies INI setting is d Deprecated: session_start(): Enabling session.use_trans_sid INI setting is deprecated in %s on line 32 Deprecated: Constant SID is deprecated in %s on line 34 -PHPSESSID=%s \ No newline at end of file +PHPSESSID=%s diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re index fabfa34d57e26..8238cce5fe321 100644 --- a/ext/standard/url_scanner_ex.re +++ b/ext/standard/url_scanner_ex.re @@ -102,7 +102,7 @@ static zend_result php_ini_on_update_tags(zend_ini_entry *entry, zend_string *ne static PHP_INI_MH(OnUpdateSessionTags) { - if (strcmp("a=href,area=href,frame=src,form=", ZSTR_VAL(new_value)) != 0) { + if (!zend_string_starts_with_literal(new_value, "a=href,area=href,frame=src,form=")) { php_error_docref(NULL, E_DEPRECATED, "Usage of session.trans_sid_tags INI setting is deprecated"); } return php_ini_on_update_tags(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, /* is_session */ true); @@ -155,7 +155,7 @@ static zend_result php_ini_on_update_hosts(zend_ini_entry *entry, zend_string *n static PHP_INI_MH(OnUpdateSessionHosts) { - if (strcmp("", ZSTR_VAL(new_value)) != 0) { + if (ZSTR_LEN(new_value) != 0) { php_error_docref(NULL, E_DEPRECATED, "Usage of session.trans_sid_hosts INI setting is deprecated"); } return php_ini_on_update_hosts(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, /* is_session */ true); From af8c854a8104eea8ebe0e332ef44f48ffd799cf5 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Sat, 4 May 2024 16:25:41 +0200 Subject: [PATCH 07/13] Remove --disable-debug-pack --- .github/scripts/windows/build_task.bat | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index e8d84b8c0bfd6..8eeca72ca9001 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -40,7 +40,6 @@ if "%PLATFORM%" == "x86" ( cmd /c configure.bat ^ --enable-snapshot-build ^ - --disable-debug-pack ^ --enable-com-dotnet=shared ^ --without-analyzer ^ --enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^ From c457fac945b4fe015e48c4ccf0a22b08acda42ec Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Wed, 8 May 2024 11:06:03 +0200 Subject: [PATCH 08/13] Revert "Remove --disable-debug-pack" This reverts commit 31d0198ea53452286a8f8440eb7c5214b26b7692. --- .github/scripts/windows/build_task.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index 8eeca72ca9001..e8d84b8c0bfd6 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -40,6 +40,7 @@ if "%PLATFORM%" == "x86" ( cmd /c configure.bat ^ --enable-snapshot-build ^ + --disable-debug-pack ^ --enable-com-dotnet=shared ^ --without-analyzer ^ --enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^ From 1d850e73967aaf4e4f9899efae8f7ac63d7d117a Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Wed, 8 May 2024 11:06:30 +0200 Subject: [PATCH 09/13] Revert "Fix failing windows tests" This reverts commit f43439a4161874feaeac90b47c7d185581cbf123. --- ext/session/tests/bug71974.phpt | 1 - ext/session/tests/rfc1867.phpt | 1 - ext/session/tests/rfc1867_cleanup.phpt | 1 - ext/session/tests/rfc1867_disabled.phpt | 1 - ext/session/tests/rfc1867_disabled_2.phpt | 1 - ext/session/tests/rfc1867_inter.phpt | 1 - ext/session/tests/rfc1867_no_name.phpt | 1 - ext/session/tests/rfc1867_sid_cookie.phpt | 1 - ext/session/tests/rfc1867_sid_get.phpt | 1 - ext/session/tests/rfc1867_sid_get_2.phpt | 1 - ext/session/tests/rfc1867_sid_invalid.phpt | 1 - ext/session/tests/rfc1867_sid_post.phpt | 1 - 12 files changed, 12 deletions(-) diff --git a/ext/session/tests/bug71974.phpt b/ext/session/tests/bug71974.phpt index 9e441e0db10ee..ca3e6d0b326e3 100644 --- a/ext/session/tests/bug71974.phpt +++ b/ext/session/tests/bug71974.phpt @@ -5,7 +5,6 @@ session --SKIPIF-- --INI-- -error_reporting=-1 session.save_handler=files session.auto_start=0 session.use_cookies=1 diff --git a/ext/session/tests/rfc1867.phpt b/ext/session/tests/rfc1867.phpt index 59f64c4ffe7e4..92ece50ce2faa 100644 --- a/ext/session/tests/rfc1867.phpt +++ b/ext/session/tests/rfc1867.phpt @@ -1,7 +1,6 @@ --TEST-- session rfc1867 --INI-- -error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_cleanup.phpt b/ext/session/tests/rfc1867_cleanup.phpt index 5f08b575a9ca2..af25f9b7d5037 100644 --- a/ext/session/tests/rfc1867_cleanup.phpt +++ b/ext/session/tests/rfc1867_cleanup.phpt @@ -1,7 +1,6 @@ --TEST-- session rfc1867 --INI-- -error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_disabled.phpt b/ext/session/tests/rfc1867_disabled.phpt index caae8813f1118..4d772ae6e4e79 100644 --- a/ext/session/tests/rfc1867_disabled.phpt +++ b/ext/session/tests/rfc1867_disabled.phpt @@ -1,7 +1,6 @@ --TEST-- session rfc1867 disabled --INI-- -error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_disabled_2.phpt b/ext/session/tests/rfc1867_disabled_2.phpt index 8858c30aa549d..c261c24d0ff65 100644 --- a/ext/session/tests/rfc1867_disabled_2.phpt +++ b/ext/session/tests/rfc1867_disabled_2.phpt @@ -1,7 +1,6 @@ --TEST-- session rfc1867 disabled 2 --INI-- -error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_inter.phpt b/ext/session/tests/rfc1867_inter.phpt index 44363e964cd5a..56aae9815c952 100644 --- a/ext/session/tests/rfc1867_inter.phpt +++ b/ext/session/tests/rfc1867_inter.phpt @@ -1,7 +1,6 @@ --TEST-- session rfc1867 --INI-- -error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_no_name.phpt b/ext/session/tests/rfc1867_no_name.phpt index a699f93e29d49..83730b0cc0004 100644 --- a/ext/session/tests/rfc1867_no_name.phpt +++ b/ext/session/tests/rfc1867_no_name.phpt @@ -1,7 +1,6 @@ --TEST-- session rfc1867 no name --INI-- -error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_sid_cookie.phpt b/ext/session/tests/rfc1867_sid_cookie.phpt index 19bd819f745c6..bd872adcd2fe3 100644 --- a/ext/session/tests/rfc1867_sid_cookie.phpt +++ b/ext/session/tests/rfc1867_sid_cookie.phpt @@ -1,7 +1,6 @@ --TEST-- session rfc1867 sid cookie --INI-- -error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_sid_get.phpt b/ext/session/tests/rfc1867_sid_get.phpt index b12eab66058fd..ee9a5c14ac366 100644 --- a/ext/session/tests/rfc1867_sid_get.phpt +++ b/ext/session/tests/rfc1867_sid_get.phpt @@ -1,7 +1,6 @@ --TEST-- session rfc1867 sid get --INI-- -error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_sid_get_2.phpt b/ext/session/tests/rfc1867_sid_get_2.phpt index 6871e49914311..da8696f0cb0b8 100644 --- a/ext/session/tests/rfc1867_sid_get_2.phpt +++ b/ext/session/tests/rfc1867_sid_get_2.phpt @@ -1,7 +1,6 @@ --TEST-- session rfc1867 sid get 2 --INI-- -error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_sid_invalid.phpt b/ext/session/tests/rfc1867_sid_invalid.phpt index 7c1c9a7e5a806..53d90e9b40c4b 100644 --- a/ext/session/tests/rfc1867_sid_invalid.phpt +++ b/ext/session/tests/rfc1867_sid_invalid.phpt @@ -1,7 +1,6 @@ --TEST-- session rfc1867 sid cookie --INI-- -error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= diff --git a/ext/session/tests/rfc1867_sid_post.phpt b/ext/session/tests/rfc1867_sid_post.phpt index 656d3a7793d06..192fd2d8a0984 100644 --- a/ext/session/tests/rfc1867_sid_post.phpt +++ b/ext/session/tests/rfc1867_sid_post.phpt @@ -1,7 +1,6 @@ --TEST-- session rfc1867 sid post --INI-- -error_reporting=-1 file_uploads=1 upload_max_filesize=1024 session.save_path= From ad35e687c07ca428f4b91598dda4c71f236041ca Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Wed, 21 Aug 2024 12:22:49 +0200 Subject: [PATCH 10/13] Add display_startup_errors=0 --- ext/session/tests/rfc1867_inter.phpt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/session/tests/rfc1867_inter.phpt b/ext/session/tests/rfc1867_inter.phpt index 56aae9815c952..5ab9983ea14b1 100644 --- a/ext/session/tests/rfc1867_inter.phpt +++ b/ext/session/tests/rfc1867_inter.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 --INI-- +display_startup_errors=0 file_uploads=1 upload_max_filesize=1024 session.save_path= @@ -137,5 +138,3 @@ array(5) { } } bool(false) - -Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 From 143842992244b6e0d00b29bdb184d5008f0c0626 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Wed, 21 Aug 2024 13:40:56 +0200 Subject: [PATCH 11/13] Add "session.configuration" --- ext/session/session.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/session/session.c b/ext/session/session.c index ac8e4ba88f8f7..346b3d74253ce 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -815,7 +815,7 @@ static PHP_INI_MH(OnUpdateUseOnlyCookies) bool *p = (bool *) ZEND_INI_GET_ADDR(); *p = zend_ini_parse_bool(new_value); if (!*p) { - php_error_docref(NULL, E_DEPRECATED, "Disabling session.use_only_cookies INI setting is deprecated"); + php_error_docref("session.configuration", E_DEPRECATED, "Disabling session.use_only_cookies INI setting is deprecated"); } return SUCCESS; } @@ -827,7 +827,7 @@ static PHP_INI_MH(OnUpdateUseTransSid) bool *p = (bool *) ZEND_INI_GET_ADDR(); *p = zend_ini_parse_bool(new_value); if (*p) { - php_error_docref(NULL, E_DEPRECATED, "Enabling session.use_trans_sid INI setting is deprecated"); + php_error_docref("session.configuration", E_DEPRECATED, "Enabling session.use_trans_sid INI setting is deprecated"); } return SUCCESS; } @@ -837,7 +837,7 @@ static PHP_INI_MH(OnUpdateRefererCheck) SESSION_CHECK_ACTIVE_STATE; SESSION_CHECK_OUTPUT_STATE; if (ZSTR_LEN(new_value) != 0) { - php_error_docref(NULL, E_DEPRECATED, "Usage of session.referer_check INI setting is deprecated"); + php_error_docref("session.configuration", E_DEPRECATED, "Usage of session.referer_check INI setting is deprecated"); } return OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); } From 5ba6f11dc06b3938df2b0210d8f9f7e3c3a22bc4 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Wed, 21 Aug 2024 19:28:52 +0200 Subject: [PATCH 12/13] Add display_startup_errors=0 --- ext/session/tests/bug71974.phpt | 5 +---- ext/session/tests/rfc1867.phpt | 3 +-- ext/session/tests/rfc1867_cleanup.phpt | 3 +-- ext/session/tests/rfc1867_disabled.phpt | 3 +-- ext/session/tests/rfc1867_disabled_2.phpt | 3 +-- ext/session/tests/rfc1867_no_name.phpt | 3 +-- ext/session/tests/rfc1867_sid_cookie.phpt | 3 +-- ext/session/tests/rfc1867_sid_get.phpt | 3 +-- ext/session/tests/rfc1867_sid_get_2.phpt | 3 +-- ext/session/tests/rfc1867_sid_invalid.phpt | 3 --- ext/session/tests/rfc1867_sid_post.phpt | 3 +-- 11 files changed, 10 insertions(+), 25 deletions(-) diff --git a/ext/session/tests/bug71974.phpt b/ext/session/tests/bug71974.phpt index ca3e6d0b326e3..225a465f4c572 100644 --- a/ext/session/tests/bug71974.phpt +++ b/ext/session/tests/bug71974.phpt @@ -5,6 +5,7 @@ session --SKIPIF-- --INI-- +display_startup_errors=0 session.save_handler=files session.auto_start=0 session.use_cookies=1 @@ -21,7 +22,3 @@ session_start() abc --EXPECT-- abc - -Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 - -Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867.phpt b/ext/session/tests/rfc1867.phpt index 92ece50ce2faa..6e2cf22752947 100644 --- a/ext/session/tests/rfc1867.phpt +++ b/ext/session/tests/rfc1867.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 --INI-- +display_startup_errors=0 file_uploads=1 upload_max_filesize=1024 session.save_path= @@ -133,5 +134,3 @@ array(5) { } } } - -Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_cleanup.phpt b/ext/session/tests/rfc1867_cleanup.phpt index af25f9b7d5037..2cb25e8d6929a 100644 --- a/ext/session/tests/rfc1867_cleanup.phpt +++ b/ext/session/tests/rfc1867_cleanup.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 --INI-- +display_startup_errors=0 file_uploads=1 upload_max_filesize=1024 session.save_path= @@ -87,5 +88,3 @@ array(2) { } } bool(false) - -Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_disabled.phpt b/ext/session/tests/rfc1867_disabled.phpt index 4d772ae6e4e79..4ca2048f0446e 100644 --- a/ext/session/tests/rfc1867_disabled.phpt +++ b/ext/session/tests/rfc1867_disabled.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 disabled --INI-- +display_startup_errors=0 file_uploads=1 upload_max_filesize=1024 session.save_path= @@ -80,5 +81,3 @@ array(2) { } } bool(false) - -Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_disabled_2.phpt b/ext/session/tests/rfc1867_disabled_2.phpt index c261c24d0ff65..eb45d7f4bbcd3 100644 --- a/ext/session/tests/rfc1867_disabled_2.phpt +++ b/ext/session/tests/rfc1867_disabled_2.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 disabled 2 --INI-- +display_startup_errors=0 file_uploads=1 upload_max_filesize=1024 session.save_path= @@ -80,5 +81,3 @@ array(2) { } } bool(false) - -Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_no_name.phpt b/ext/session/tests/rfc1867_no_name.phpt index 83730b0cc0004..693c3814ec0d2 100644 --- a/ext/session/tests/rfc1867_no_name.phpt +++ b/ext/session/tests/rfc1867_no_name.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 no name --INI-- +display_startup_errors=0 file_uploads=1 upload_max_filesize=1024 session.save_path= @@ -80,5 +81,3 @@ array(2) { } } bool(false) - -Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_sid_cookie.phpt b/ext/session/tests/rfc1867_sid_cookie.phpt index bd872adcd2fe3..5dc6492050f4f 100644 --- a/ext/session/tests/rfc1867_sid_cookie.phpt +++ b/ext/session/tests/rfc1867_sid_cookie.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 sid cookie --INI-- +display_startup_errors=0 file_uploads=1 upload_max_filesize=1024 session.save_path= @@ -132,5 +133,3 @@ array(5) { } } } - -Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_sid_get.phpt b/ext/session/tests/rfc1867_sid_get.phpt index ee9a5c14ac366..8929556cdb0b3 100644 --- a/ext/session/tests/rfc1867_sid_get.phpt +++ b/ext/session/tests/rfc1867_sid_get.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 sid get --INI-- +display_startup_errors=0 file_uploads=1 upload_max_filesize=1024 session.save_path= @@ -130,5 +131,3 @@ array(5) { } } } - -Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_sid_get_2.phpt b/ext/session/tests/rfc1867_sid_get_2.phpt index da8696f0cb0b8..1a771935c4af0 100644 --- a/ext/session/tests/rfc1867_sid_get_2.phpt +++ b/ext/session/tests/rfc1867_sid_get_2.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 sid get 2 --INI-- +display_startup_errors=0 file_uploads=1 upload_max_filesize=1024 session.save_path= @@ -132,5 +133,3 @@ array(5) { } } } - -Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_sid_invalid.phpt b/ext/session/tests/rfc1867_sid_invalid.phpt index 53d90e9b40c4b..2a61ab98d9206 100644 --- a/ext/session/tests/rfc1867_sid_invalid.phpt +++ b/ext/session/tests/rfc1867_sid_invalid.phpt @@ -6,7 +6,6 @@ upload_max_filesize=1024 session.save_path= session.name=PHPSESSID session.use_cookies=1 -session.use_only_cookies=0 session.use_strict_mode=0 session.auto_start=0 session.upload_progress.enabled=1 @@ -144,5 +143,3 @@ array(5) { } } } - -Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 diff --git a/ext/session/tests/rfc1867_sid_post.phpt b/ext/session/tests/rfc1867_sid_post.phpt index 192fd2d8a0984..62bc17bd83831 100644 --- a/ext/session/tests/rfc1867_sid_post.phpt +++ b/ext/session/tests/rfc1867_sid_post.phpt @@ -1,6 +1,7 @@ --TEST-- session rfc1867 sid post --INI-- +display_startup_errors=0 file_uploads=1 upload_max_filesize=1024 session.save_path= @@ -128,5 +129,3 @@ array(5) { } } } - -Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0 From 1269989fb0b5f59d12d2f43ad020ed2742e70696 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Wed, 21 Aug 2024 21:42:28 +0200 Subject: [PATCH 13/13] Apply suggestions from code review Co-authored-by: Christoph M. Becker --- ext/standard/url_scanner_ex.re | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re index 8238cce5fe321..1ce7521d7fab1 100644 --- a/ext/standard/url_scanner_ex.re +++ b/ext/standard/url_scanner_ex.re @@ -103,7 +103,7 @@ static zend_result php_ini_on_update_tags(zend_ini_entry *entry, zend_string *ne static PHP_INI_MH(OnUpdateSessionTags) { if (!zend_string_starts_with_literal(new_value, "a=href,area=href,frame=src,form=")) { - php_error_docref(NULL, E_DEPRECATED, "Usage of session.trans_sid_tags INI setting is deprecated"); + php_error_docref("session.configuration", E_DEPRECATED, "Usage of session.trans_sid_tags INI setting is deprecated"); } return php_ini_on_update_tags(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, /* is_session */ true); } @@ -156,7 +156,7 @@ static zend_result php_ini_on_update_hosts(zend_ini_entry *entry, zend_string *n static PHP_INI_MH(OnUpdateSessionHosts) { if (ZSTR_LEN(new_value) != 0) { - php_error_docref(NULL, E_DEPRECATED, "Usage of session.trans_sid_hosts INI setting is deprecated"); + php_error_docref("session.configuration", E_DEPRECATED, "Usage of session.trans_sid_hosts INI setting is deprecated"); } return php_ini_on_update_hosts(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, /* is_session */ true); }