List Info

Thread: note 70835 added to function.ini-set




note 70835 added to function.ini-set
user name
2006-10-31 01:19:25
Be careful with setting an output_handler, as you can't use
ini_set() to change it. *sigh*

In my php.ini I have this for my web pages (and I want it): 

  output_handler = ob_gzhandler

But this causes my command line scripts to not show output
until the very end.

#!/usr/bin/php -q
<?php
ini_set('output_handler', 'mb_output_handler');
echo "noutput_handler => " .
ini_get('output_handler') . "n";
?>

root# ./myscript.php
output_handler => ob_gzhandler

Apparently (acording to Richard Lynch):

> TOO LATE!
> The ob_start() has already kicked in by this point.
> ob_flush() until there are no more buffers.
----
Server IP: 64.71.164.2
Probable Submitter: 64.81.162.33
----
Manual Page -- htt
p://www.php.net/manual/en/function.ini-set.php
Edit        -- https://master
.php.net/note/edit/70835
Del: integrated  -- h
ttps://master.php.net/note/delete/70835/integrated
Del: useless     -- http
s://master.php.net/note/delete/70835/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/70835/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/70835/spam
Del: non-english -- 
https://master.php.net/note/delete/70835/non-english
Del: in docs     -- http
s://master.php.net/note/delete/70835/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/70835
Reject      -- https://mast
er.php.net/note/reject/70835
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )