|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14991 ini_set scrambles output
Submitted: 2002-01-11 04:36 UTC Modified: 2002-09-26 11:51 UTC
Avg. Score:4.0 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: fischer at ms-net dot de Assigned:
Status: Closed Package: Session related
PHP Version: 4.1.1 OS: Free BSD 4.4
Private report: No CVE-ID: None
 [2002-01-11 04:36 UTC] fischer at ms-net dot de
The following Code shows some strange behaviour:

<table cellspacing="2" cellpadding="2" border="0">
      <td class="grossfett" valign="top" align="left">Galerie</td>
      <td valign="top" nowrap> 
$d = dir("$DOCUMENT_ROOT/3sonstiges/felgenveredelung/bp/galerie/thumbs/");
[...snipped some echo "blabla";lines]

The following Output is produced:

  <table cellspacing="2" cellpadding="2" border="0">
      <td class="grossfett" valign="top" align="left">Galerie</td>
      <td<a href ="javascript:;""bp/showpic.php?pic
,toolbar=0,width=380,height=250");><img src="bp/galerie/thumbs/1.jpg"
[...snipped the list]
 valign="top" nowrap>

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?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-24 15:14 UTC] fischer at ms-net dot 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-02-27 05:20 UTC] miroslav dot spanel at cad-programs dot 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-03-03 08:44 UTC] mail at jpschober dot 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-09-26 10:22 UTC]
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.

 [2002-09-26 11:51 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun May 26 07:01:26 2019 UTC