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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 17:01:36 2024 UTC