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