[Typo3-dev] Bug in class.gzip_encode
4Dfx
peter.russ at 4dfx.de
Sat Sep 6 03:13:53 CEST 2003
Simon Child schrieb:
> "Peter Russ :: 4Dfx" <peter.russ at 4dfx.de> wrote in message
> news:mailman.1062756856.11732.typo3-dev at lists.netfielders.de...
>
[...]
>
> With double =
> FE compressionLevel Content-Length
> true 2347
> 0 7703 (not-gzipped)
> 7 2346
> 9 2346
>
>
> With triple =
> FE compressionLevel Content-Length
> true 7729
> 0 7703 (not-gzipped)
> 7 2346
>
> [server load is low, load average: 0.04, 0.11, 0.05, the site is not yet
> published and so there is only me using the server]
>
> It appears to me that with triple = a setting of 'true' is not giving the
> desired result, but with double = it works well...
[...]
Dived into the code and found the problem:
if the level var is set in $TYPO3_CONF_VARS the type is String (!)
So to get the compression working you have to fix index.php (line 500)
in root.
i.e.
// *************
// Compressions
// *************
if ($TYPO3_CONF_VARS["FE"]["compressionLevel"]) {
new gzip_encode($TYPO3_CONF_VARS["FE"]["compressionLevel"], false,
$GLOBALS["TYPO3_CONF_VARS"]["FE"]["compressionDebugInfo"]);
}
and debug:
// *************
// Compressions
// *************
if ($TYPO3_CONF_VARS["FE"]["compressionLevel"]) {
/* add this line to convert to Boolean if true
debug Peter Russ 06.09.2003 beginn */
$complevel=($TYPO3_CONF_VARS["FE"]["compressionLevel"]=='true')?true:$TYPO3_CONF_VARS["FE"]["compressionLevel"];
/* debug end*/
new gzip_encode($complevel, false,
$GLOBALS["TYPO3_CONF_VARS"]["FE"]["compressionDebugInfo"]);
}
Gruss. Peter Russ.
www.ebconclub.net
More information about the TYPO3-dev
mailing list