#32870 [NEW]: Setting "output_handler" does not work with custom functions
| From: | ng4rrjanbiah at rediffmail dot com | Date: | Thu, 28 Apr 2005 15:56:01 +0000 |
| Subject: | #32870 [NEW]: Setting "output_handler" does not work with custom functions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-78378@lists.php.net to get a copy of this message | ||
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/groups?as_umsgid=1114004547.490393.294850@z14g2000cwz.googlegroups.com
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