#34701 [Opn->Bgs]: url_rewriter.tags won't work with output buffer and eval
| From: | sniper@php.net | Date: | Sat, 01 Oct 2005 14:58:17 +0000 |
| Subject: | #34701 [Opn->Bgs]: url_rewriter.tags won't work with output buffer and eval | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-85850@lists.php.net to get a copy of this message | ||
ID: 34701
Updated by: sniper@php.net
Reported By: php dot net at callerid dot de
-Status: Open
+Status: Bogus
Bug Type: Session related
Operating System: linux, windows
PHP Version: 5CVS-2005-10-01 (snap)
New Comment:
It's not expected.
Previous Comments:
------------------------------------------------------------------------
[2005-10-01 16:53:53] php dot net at callerid dot de
Description:
------------
If an output is produced inside an eval that is captured in an output
buffer, the url will not be supplemented with the session-ID as
expected.
This happens only if the session_start is also inside the eval'd code.
The behaviour can be reproduced independently from OS or PHP-Version,
if session.use-trans-sid is set.
Reproduce code:
---------------
<?php
$source = <<<EOQ
session_start();
echo "<a href=\"index.html\">Testlink</a>";
EOQ;
ob_start();
eval($source);
$content = ob_get_contents();
ob_end_clean();
echo $content;
?>
Expected result:
----------------
<a href="index.html?PHPSESSID=.....">Testlink</a>
Actual result:
--------------
<a href="index.html">Testlink</a>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34701&edit=1