xref: /php-src/ext/session/tests/bug74892.phpt (revision c5bce0d8)
1--TEST--
2Bug #74892 Url Rewriting (trans_sid) not working on urls that start with #
3--INI--
4session.use_cookies=0
5session.use_only_cookies=0
6session.use_trans_sid=1
7--EXTENSIONS--
8session
9--SKIPIF--
10<?php include('skipif.inc'); ?>
11--FILE--
12<?php
13ob_start();
14ini_set('session.trans_sid_hosts','php.net'); // This value cannot be set in the INI file
15session_id('sessionidhere');
16session_start();
17
18?>
19<p><a href="index.php">Click This Anchor Tag!</a></p>
20<p><a href="index.php#place">External link with anchor</a></p>
21<p><a href="http://php.net#foo">External link with anchor 2</a></p>
22<p><a href="#place">Internal link</a></p>
23--EXPECTF--
24Deprecated: PHP Startup: Disabling session.use_only_cookies INI setting is deprecated in Unknown on line 0
25
26Deprecated: PHP Startup: Enabling session.use_trans_sid INI setting is deprecated in Unknown on line 0
27
28Deprecated: ini_set(): Usage of session.trans_sid_hosts INI setting is deprecated in %s on line 3
29<p><a href="index.php?PHPSESSID=sessionidhere">Click This Anchor Tag!</a></p>
30<p><a href="index.php?PHPSESSID=sessionidhere#place">External link with anchor</a></p>
31<p><a href="http://php.net?PHPSESSID=sessionidhere#foo">External link with anchor 2</a></p>
32<p><a href="#place">Internal link</a></p>
33