php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23570 SID constant empty
Submitted: 2003-05-09 17:55 UTC Modified: 2003-05-13 19:48 UTC
From: garretrich at charter dot net Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.1 OS: Windows ME
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: garretrich at charter dot net
New email:
PHP Version: OS:

 

 [2003-05-09 17:55 UTC] garretrich at charter dot net
In all of my code since upgrading to 4.3.1, I am able to use $PHPSESSID but not SID on my Windows ME machine.

Code:
<?php
error_reporting(E_ALL);
session_start();
print "SID: " . SID . "<br>" . "\$PHPSESSID: " . $PHPSESSID;
?>

Complete Browser Output:
SID: 
$PHPSESSID: e9a1fa61bbadb3756cc06052625b5e40

returns no undefined constant notices. It seems that the SID constant is defined but empty.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-13 19:48 UTC] sniper@php.net
You need to read the manual once more:

"Alternatively, you can use the constant SID which is always defined. If the client did not send an appropriate session cookie, it has the form session_name=session_id. Otherwise, it expands to an empty string. Thus, you can embed it unconditionally into URLs."

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 03:00:02 2026 UTC