php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #14829 Session ID is not added if output is compressed with ob_gzhandler
Submitted: 2002-01-03 12:40 UTC Modified: 2002-01-07 06:34 UTC
From: hkdw at gmx dot net Assigned: yohgaki (profile)
Status: Closed Package: Documentation problem
PHP Version: 4.1.0 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: hkdw at gmx dot net
New email:
PHP Version: OS:

 

 [2002-01-03 12:40 UTC] hkdw at gmx dot net
This is the prepend for all of my files:

// Start session
$s_permission = false;
@session_start();
session_register("s_permission");
$fallback = session_name()."=".session_id();

// Start output buffering
ob_start("ob_gzhandler");
ob_implicit_flush(0);

----

This is the footer:

ob_end_flush();

----

The script output works, but the session id is not added to any URLs (if cookies are set off for sessions). When I remove the output buffering things turn out fine and the SESSION-ID is added to the URLs. I've tried to add <?=SID?> on each URL, but that didn't help either. I invented a variable called $fallback, and add this to each URL, but this can't be a perfect solution, as without output compression this is not necessary.

Thanx
Daniel

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-06 22:47 UTC] yohgaki@php.net
Output control would be better type, but change this to Doc problem, since I'm going to change doc.

BTW, why you use  ob_implicit_flush() with ob_gzhandler?
Anyway, use zlib.compression instead of ob_gzhandler, then output compression and trans sid would work. Or register ob_gzhandler *before* starting session. (i.e. The order of output handler regsiteration is *wrong* and it simply does not work) 


 [2002-01-07 06:34 UTC] yohgaki@php.net
Doc updated.
There is appropriate bug report for handling output buffers correctly. Closing this bug report.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 28 23:01:27 2024 UTC