|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-02-18 12:28 UTC] martin dot schmitz at uni-bielefeld dot de
Description:
------------
Session (SID) generates always an new id, when cookies are disabled (PHP Version 5.6.0)
Test script:
---------------
<?php
session_name('test');
session_start();
echo '<a href="?'.SID.'">test</a>'
?>
Expected result:
----------------
constant id, if no timeout kills session
Actual result:
--------------
always new id
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 24 04:00:01 2025 UTC |
Make sure you're editing the right php.ini, and you're already restarting the server. Past experience has shown me that if the problem persists then there's some sort of server- or environment-specific situation to blame. Meanwhile, use_only_cookies can be set at runtime so you can at least test that. <?php ini_set("session.use_only_cookies", 0); session_name('test'); session_start(); echo '<a href="?'.SID.'">test</a>'; ?>session_name('test'); session_start(); echo '<a href="?'.SID.'">test</a> This code is wrong. session_name('test'); session_start(); echo '<a href="?test='.SID.'">test</a> is correct for trans_sid usage.