php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24572 SID's appended to relative links upon first view regardless of cookies availabl
Submitted: 2003-07-09 21:32 UTC Modified: 2003-07-09 21:51 UTC
From: scot at goldentroll dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: Irrelevant OS: Apache
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: scot at goldentroll dot com
New email:
PHP Version: OS:

 

 [2003-07-09 21:32 UTC] scot at goldentroll dot com
Description:
------------
I am using the latest stable release 4.2.3
php_ini - session.use_trans_sid = on

Session id's are being appended to all relative links upon first view regardless if cookies are available or not.

I can't read a cookie that has been set until the page is reloaded.


Reproduce code:
---------------
session_start();
if (!$PHPSESSID)){
// PHPSESSID is the session name-hence name of variable set in session_start
ini_set('session.use_trans_sid', true);
}else {
ini_set('session.use_trans_sid', false);
} 
 

Expected result:
----------------
I would like to know if cookies are available to a page when it loads. I wish PHP did not append the links unless cookies are not available to store the session id and value

Actual result:
--------------
(!$PHPSESSID) will always be true until the page is reloaded.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-09 21:37 UTC] scot at goldentroll dot com
to use this code i set session.use_trans_sid = off in htaccess (shared server)
 [2003-07-09 21:51 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

..

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 10:01:38 2025 UTC