xref: /PHP-8.2/ext/session/tests/014.phpt (revision b5a14e6c)
1--TEST--
2a script should not be able to modify session.use_trans_sid
3--EXTENSIONS--
4session
5--SKIPIF--
6<?php include('skipif.inc'); ?>
7--INI--
8session.use_trans_sid=0
9session.use_cookies=0
10session.use_strict_mode=0
11session.cache_limiter=
12session.name=PHPSESSID
13session.serialize_handler=php
14session.save_handler=files
15--FILE--
16<?php
17error_reporting(E_ALL);
18
19session_id("test014");
20session_start();
21
22?>
23<a href="/link">
24<?php
25ini_set("session.use_trans_sid","1");
26?>
27<a href="/link">
28<?php
29ini_set("session.use_trans_sid","0");
30?>
31<a href="/link">
32<?php
33session_destroy();
34?>
35--EXPECTF--
36<a href="/link">
37
38Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
39<a href="/link">
40
41Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
42<a href="/link">
43