php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33055 tran_sid not working
Submitted: 2005-05-18 14:38 UTC Modified: 2005-05-19 00:19 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: b-bonini at cox dot net Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.0.3 OS: FreeBSD 4.4
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: b-bonini at cox dot net
New email:
PHP Version: OS:

 

 [2005-05-18 14:38 UTC] b-bonini at cox dot net
Description:
------------
session.use_trans_sid is set to 1 in php.ini but SID is 
not in the URL and sessions are NOT working with cookies 
disabled (in either php.ini or browser). It is not being 
over-ridden elsewhere (i.e., http.conf or .htaccess or via 
ini_set). Other changes in php.ini DO take effect, just 
not this one. Session  file IS created in /tmp with an 
initial value of 0 but never increments (see script 
below). Basically, with cookies enabled everything is 
fine, diable them and the script relying on sessions stops 
working.  
 
phpinfo(): http://gfx.gfx-design.com/php_info.php 

Reproduce code:
---------------
RELEVANT SECTION OF CODE:

session_start(); 
header("Cache-control: private"); // IE 6 Fix

if (!isset($_SESSION['user_quotes']) || $_SESSION['user_quotes'] >=
count($quote
_result) - 1) {
   $_SESSION['user_quotes'] = 0;
} else {
   $_SESSION['user_quotes']++;
}


Expected result:
----------------
$_SESSION['user_quotes'] to increment by 1 or set to 0 if 
it's greater than or equal to $quote_results or does not 
exist... 
 
Again, works fine with cookies enabled, fails (not the 
script itself) with them disabled. 

Actual result:
--------------
counter is not incremented. 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-18 14:43 UTC] b-bonini at cox dot net
BTW: The full script is here: 
http://rejectioncollection.com/quotes.txt 
 
It controls the "user quotes" in the grey box on this 
page: http://rejectioncollection.com/buybook.php 
 
AGAIN: cookeis enabled=fine, cookies disabled=no good.
 [2005-05-18 17:54 UTC] b-bonini at cox dot net
Installed latest CVS per previous comment: 
/php5-STABLE-200505181440 (PHP Version 5.0.5-dev) 
 
- Same behaviour as originally cited. 
- Same URL's still apply. 
- added: http://gfx.gfx-design.com/session_test.php 
*Note: SID changes with each browser refresh...
 [2005-05-18 17:57 UTC] b-bonini at cox dot net
BTW: This seems consistant across a few different machines 
I have all running FreeBSD 4.4
 [2005-05-18 18:34 UTC] b-bonini at cox dot net
Also: "*Note: SID changes with each browser refresh..." 
 
IF COOKIES ARE OFF IN BROWSER...
 [2005-05-18 20:25 UTC] b-bonini at cox dot net
OK, apparently previous comment is irrelevant but 
everything else still applies..
 [2005-05-18 20:54 UTC] tony2001@php.net
What does this code output for you ?
<?
session_start();
var_dump($_SESSION['user_quotes']++);
?>
What if you try another browser, that doesn't require any "fixes" ?
 [2005-05-18 22:43 UTC] b-bonini at cox dot net
int(0) where zero is the number which is being incremented 
now. I think this is my bust... I was expecting SID to 
appear in the URL after a page refresh. But more 
importantly, like with cookies, expecting the counter to 
increment with each refresh but in fact apparently this is 
not the case and a new SID is issued with each page 
refresh thus continually setting the initial value to 0 
and never incrementing the counter as it does using 
cookies. So sorry to waste your time...
 [2005-05-19 00:19 UTC] tony2001@php.net
No bug -> bogus.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 05 12:01:34 2025 UTC