#14991 [Opn->Ana]: ini_set scrambles output
| From: | wez@php.net | Date: | Thu, 26 Sep 2002 15:22:22 +0000 |
| Subject: | #14991 [Opn->Ana]: ini_set scrambles output | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-20418@lists.php.net to get a copy of this message | ||
ID: 14991
Updated by: wez@php.net
Reported By: fischer@ms-net.de
-Status: Open
+Status: Analyzed
-Bug Type: Scripting Engine problem
+Bug Type: Session related
Operating System: Free BSD 4.4
PHP Version: 4.1.1
New Comment:
It doesn't make sense to change session.use_trans_sid from
within the script as it needs to be set before your script
runs in order to set up the output buffer.
Changing it during the script is causing undefined behaviour since PHP
started out believing that it is to
apply the url rewriting but then suddenly finds that it
isn't anymore.
Previous Comments:
------------------------------------------------------------------------
[2002-03-03 08:44:49] mail@jpschober.de
I have problems with this bug too ... same scrambled output. But only
when the session is not cookie-based. Otherwise it works fine.
------------------------------------------------------------------------
[2002-02-27 05:20:49] miroslav.spanel@cad-programs.com
On Windows platforms (windows2000/php4.1.1 - isapi app on IIS 5.0)
ini_set not workink properly too. Output is also scrambled.
------------------------------------------------------------------------
[2002-01-24 15:14:18] fischer@ms-net.de
I fix this Problem now by reading the incorrect output into a
output-buffer using ob_get_contents and tweak it with preg_replace,
duh!
Works, but is, ehh, not very smart #-)
But, surprise surprise, i then come over the error described in PHP-Bug
#14080(which is still not fixed in 4.1.1).
funny, eh?
------------------------------------------------------------------------
[2002-01-11 04:36:17] fischer@ms-net.de
The following Code shows some strange behaviour:
<table cellspacing="2" cellpadding="2" border="0">
<tr>
<td class="grossfett" valign="top"
align="left">Galerie</td>
</tr>
<tr>
<td valign="top" nowrap>
<?php
ini_set("session.use_trans_sid","0");
$cnt=0;
$d =
dir("$DOCUMENT_ROOT/3sonstiges/felgenveredelung/bp/galerie/thumbs/");
while($entry=$d->read())
{
[...snipped some echo "blabla";lines]
}
$d->close();
ini_set("session.use_trans_sid","1");
?>
</td>
</tr>
</table>
The following Output is produced:
<table cellspacing="2" cellpadding="2" border="0">
<tr>
<td class="grossfett" valign="top"
align="left">Galerie</td>
</tr>
<tr>
<td<a href ="javascript:;"
onClick=window.open("bp/showpic.php?pic
=1.jpg","hurz","location=0,directories=0,status=0,menubar=0,scrollbars=0
,toolbar=0,width=380,height=250");><img src="bp/galerie/thumbs/1.jpg"
border="0"></a>
[...snipped the list]
valign="top" nowrap>
</td>
</tr>
</table>
watch the
<td<a href [...]
this should be
<td valign="top" nowrap><a href [...]
If i comment out the ini_set(); lines, output is normal.
Any Idea?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=14991&edit=1