php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #28749 ob_start() incorrect warning message
Submitted: 2004-06-12 02:40 UTC Modified: 2004-09-18 20:40 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: php at nevyn dot net dot nospam Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 4.3.5 OS:
Private report: No CVE-ID: None
 [2004-06-12 02:40 UTC] php at nevyn dot net dot nospam
Description:
------------
Hey,

I believe there is an incorrect (confusing) error message when ini_set('url_rewriter.tags', 0); is used after ob_start("ob_gzhandler");

Laters,
Lukian.

Reproduce code:
---------------
<?php // header.php
if (!isset($_SESSION)) session_start();
include_once('/home/nevyn/public_html/xhtml.php');
ini_set('url_rewriter.tags', 0);
/* ... more code ... */
?>

<?php // xhtml.php
error_reporting(E_ALL);
if (@strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "gzip")) ob_start("ob_gzhandler");
/* ... more code ... */
?>

Expected result:
----------------
Warning: ob_start(): output handler 'ob_gzhandler' cannot be used if 'URL-Rewriter' has been executed after 'ob_gzhandler' was initialised in (file) on line (number)

or similar..
possible advising the user that the correct ordering is:

ini_set('url_rewriter.tags', 0);
ob_start("ob_gzhandler");

Actual result:
--------------
Warning: ob_start(): output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter' in /home/nevyn/public_html/xhtml.php on line 3

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-18 20:40 UTC] vrana@php.net
The problem is probably caused by something else because the error is triggered _before_ call to ini_set.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 18:01:33 2024 UTC