From:             ng4rrjanbiah at rediffmail dot com
Operating system: Windows XP
PHP version:      5.0.4
PHP Bug Type:     Output Control
Bug description:  Setting "output_handler" does not work with custom functions

Description:
------------
Setting output_handler (either through php.ini our .htaccess) does not
work with custom functions. It works for "ob_gzhandler" but *not* on any
custom functions--say "foo".

There was a detail discussion on c.l.php about this
http://groups.google.com/[EMAIL PROTECTED]

Though we could set custom callback functions through ob_start(), we
couldn't set output_handler (for custom functions) via php.ini. The manual
also hints that it could be set PHP_INI_PERDIR basis
http://in2.php.net/ref.outcontrol#AEN111555

Peace to you all PHP saints...

-R. Rajesh Jeba Anbiah

Reproduce code:
---------------
in php.ini set:
output_handler "foo_callback"

in test.php:
<?php
function foo_callback($buffer) //callback defined

{
   return $buffer;
}

print_r(ob_list_handlers());
?>

Expected result:
----------------
"foo_callback" to be listed

Actual result:
--------------
nothing. (Callback not registered.)

-- 
Edit bug report at http://bugs.php.net/?id=32870&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32870&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32870&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32870&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32870&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32870&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32870&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32870&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32870&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32870&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32870&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32870&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32870&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32870&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32870&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32870&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32870&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32870&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32870&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32870&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32870&r=mysqlcfg

Reply via email to