Bug #10477 Updated: ob_start('function') is called before trans-sid is applied, not after
| From: | sterling@php.net | Date: | Sun, 09 Sep 2001 10:16:46 +0000 |
| Subject: | Bug #10477 Updated: ob_start('function') is called before trans-sid is applied, not after | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-65549@lists.php.net to get a copy of this message | ||
ID: 10477
Updated by: sterling
Reported By: lee@mediawaveonline.com
Old Status: Open
Status: Closed
Bug Type: Output Control
Operating System: linux 2.2
PHP Version: 4.0.4pl1
New Comment:
Fixed in CVS.
Previous Comments:
------------------------------------------------------------------------
[2001-04-24 14:03:35] lee@mediawaveonline.com
<?php
if (isset($PATH_INFO))
{
$var = explode('/', $PATH_INFO);
for($c = 1; $c < count($var); $c += 2)
{
$$var[$c] = $var[$c + 1];
$HTTP_GET_VARS[$var[$c]] = $var[$c + 1];
}
}
function fix_session($output)
{
global $SID;
$o_sid = '?'. $SID;
$n_sid = '/'. str_replace('=', '/', $SID);
$output = substr_count($output, $o_sid) .'<br>'. str_replace($o_sid, $n_sid,
$output);
return $output;
}
ob_start('fix_session');
?>
I want to convert.
index.php?PHPSESSID=xxxxxx
->
index.php/PHPSESSID/xxxxxx
this code will convert hardcoded SID links but not trans-sid. this must be caused because
fix_session() is being called 'before' trans-sid is applied, it should be called after. no
? what is strange is that if I use ob_start() to gzip my content trans-sid is astill applied, but I
dont know how this is done to compressed code.... I will have to check this.
Chris Lee
lee@mediawaveonline.com
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=10477&edit=1