Re: output handlers
| From: | (Marcus Börger) | Date: | Tue, 06 Aug 2002 10:35:00 +0000 |
| Subject: | Re: output handlers | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-13172@lists.php.net to get a copy of this message | ||
At 11:13 06.08.2002, Yasuo Ohgaki wrote:
James Cox wrote:What means portable here - Applications working on all Platforms and with all webhosters - if so we would have NO single ini setting.er, why did you post this to php-cvs and not php-dev?I've missed this post unless you ask this. Generally speaking, less php.ini settings is good for application writers who write portable scripts.
In order to deal with the issue, output_handler ini directive is better to be removed. (or strongly discourage using it) For example, if there is no output_handler directive, we don't have to check MIME type, if we may convert encoding or not. (The check code is added recently...) If we remove the directive, we can forget about buffer consistency except for zlib.output_compression and ob_gzhandler. (we are better to discourage use of ob_gzhandler, also)But now we have those checks it works great and it's automatically!
Without output_handler, users are responsibe to make buffers consistent. There is a function to check buffer status/list for this purpose. We are unable to check user defined buffer consistency, anyway. How about remove the output_handler directive, instead? It's much simpler solution and encourage people to write a portable scripts.But i know what you mean. I cannot say if i am really pro or agains removal. Most think against removal is that we would slow down many sites and perhaps we break some pages. According to the referred patch it has more to offer than ini settings.
-- Yasuo Ohgaki-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-----Original Message----- From: Marcus Boerger [mailto:marcus.boerger@t-online.de] Sent: Tuesday, August 06, 2002 4:19 AM To: php-cvs@lists.php.net Subject: [PHP-CVS] output handlers The problem: Using both internal zlib output compression (in preference to ob_gzhandler) and mb_output_handler. The solution and some side effects: 1) Use ini settings (incl. new zlib.output_handler) as followed:'output_handler = 'zlib.output_compression = On 'zlib.output_handler = mb_output_handlerThe new ini setting does the same as output_handler but only if zlib.output_compression is active and after it is being activated. 2) ob_gzhandler, mb_output_handler, ob_iconv_handler cannot be called twice. 3) ob_gzhandler cannot be combined with internal zlib compression and mb_iconv_handler cannot be combined with mb_output_handler. 4) You can supply more than one handler with ob_start() by either use a comma separated list (NO TRIM YET) or an array. 5) You can supply more than one handler from ini settings output_handler and zlib.output_handler by a comma separated list (NO TRIM YET). What is left: 1) Someone to test url rewriting / session handling (Haven't had time yet). 2) Check userland handlers.