[TYPO3-core] FYI72: #9947: gzip compression does not work in BE at all

Steffen Kamper info at sk-typo3.de
Mon Dec 15 11:45:01 CET 2008


Hi Dmitry,

Dmitry Dulepov schrieb:
> Hi!
> 
> This is SVN patch request.
> 
> Type: bug
> 
> Branches: trunk, 4.2, 4.1
> 
> BT reference: http://bugs.typo3.org/view.php?id=9947
> 
> Problem: typo3/init.php includes class.gzip_compress.php but this is not enough. According to instructions in class.gzip_encode.php there must be another call, which is neither made, nor possible with BE architecture (it is not a problem in FE). Therefore compression never works. class.gzip_encode.php requires either a call to its constructor after output is completed (not possible with Backend modules) or "autoappend" PHP file, which is not possible either.
> 
> Solution: the solution is to use PHP built-in output compression handler, which is faster anyway. 
> 
> Notes: this patch sets compression level according to the documentation on the PHP site. Notice that we cannot use ini_set('zlib.output_compression'), it simply does not work from withing a file (but works from .htaccess). So I decided on ob_gzhandler(), which is old good proven working function. Additionally this bugfix will automatically fix http://bugs.typo3.org/view.php?id=3071 (positive side effect).
> 
> 

no objection, but in the other thread in BT (#3071) you mentioned that 
this will solve the problem. Can you explain how this is related to 
empty lines in php-files?

vg Steffen


More information about the TYPO3-team-core mailing list