Re: [PHP-DEV] Re: output buffering callback limitation

2004-06-15 Thread Okin Okin
>Not sure if i undertood you. Are you trying to emit >errors during >ob_handler execution and prevent them from being >output using ob_start()? >You could use error_reporting()+error_log()[+trigger_error()] or something? Nop, I'm considering this : this code produces "Fatal error: ob_start():

Re: [PHP-DEV] Re: output buffering callback limitation

2004-06-14 Thread Andre Cerqueira
I think an ob_handler should be designed to handle output. Not create (output), nor send emails. I think the workaround is the other way around hehe It's the way you want it to work that is a workaround, since there is probably a better way to do it. -I agree, print_r($var, true) should work but

[PHP-DEV] Re: output buffering callback limitation

2004-06-14 Thread Okin Okin
One last note on this : the limitation I'm talking about is annoying in two cases for me : - I can't use "print_r($var, true)" inside an ob_handler, because print_r uses ob_start internally. And I need this to append some debug info to my buffer. The workaround for this is to make my own print_r

[PHP-DEV] Re: output buffering callback limitation

2004-06-10 Thread Andre Cerqueira
maybe php.general would be more appropriate im not a developer, but i think this "feature" doesnt make sense hehe i think ob display handlers are not supposed to output things directly, they just return them to the function that will output it at your first snip, you could/should do: at the seco

[PHP-DEV] Re: output buffering callback limitation

2004-06-10 Thread Taco van den Broek
Okin okin wrote: Hi, I'm having trouble with output buffering limitation and the output_callback function of ob_start. look at this script : function ob_perso_handler($buffer) { ob_start(); echo 'foo'; $buffer .= ob_get_contents(); ob_end_clean(); r