When changing language in IE (7 and 8), I was receiving a "Page cannot be displayed". All other Browsers (FF, Opera, etc) displayed the page correct.
W3C gave me the error:
500 Too many header lines (limit is 128)
I started debugging the problem and found out, that dolphin is trying to set a HUGE amount of cookies when changing the language:
Set-Cookie: lang=deleted; expires=Mon, 16-Mar-2009 15:47:50 GMT; path=/
Set-Cookie: lang=de; expires=Wed, 16-Mar-2011 15:47:51 GMT; path=/
Set-Cookie: lang=deleted; expires=Mon, 16-Mar-2009 15:47:50 GMT; path=/
Set-Cookie: lang=de; expires=Wed, 16-Mar-2011 15:47:51 GMT; path=/
Set-Cookie: lang=deleted; expires=Mon, 16-Mar-2009 15:47:50 GMT; path=/
Set-Cookie: lang=de; expires=Wed, 16-Mar-2011 15:47:51 GMT; path=/
Set-Cookie: lang=deleted; expires=Mon, 16-Mar-2009 15:47:50 GMT; path=/
Set-Cookie: lang=de; expires=Wed, 16-Mar-2011 15:47:51 GMT; path=/
Set-Cookie: lang=deleted; expires=Mon, 16-Mar-2009 15:47:50 GMT; path=/
Set-Cookie: lang=de; expires=Wed, 16-Mar-2011 15:47:51 GMT; path=/
Set-Cookie: lang=deleted; expires=Mon, 16-Mar-2009 15:47:50 GMT; path=/
Set-Cookie: lang=de; expires=Wed, 16-Mar-2011 15:47:51 GMT; path=/
Set-Cookie: lang=deleted; expires=Mon, 16-Mar-2009 15:47:50 GMT; path=/
Set-Cookie: lang=de; expires=Wed, 16-Mar-2011 15:47:51 GMT; path=/
Set-Cookie: lang=deleted; expires=Mon, 16-Mar-2009 15:47:50 GMT; path=/
Set-Cookie: lang=de; expires=Wed, 16-Mar-2011 15:47:51 GMT; path=/
Set-Cookie: lang=deleted; expires=Mon, 16-Mar-2009 15:47:50 GMT; path=/
[.. snipping about 500 more lines ..]
I was now able to fix this issue by changing the code as followed:
file: inc/languages.inc.php
Inside function tryToGetLang()
// check with country
if( checkLangExists( $sLang ) ) {
/* START replace
if( $bSetCookie )
setLangCookie( $sLang );
}
*/
if( $bSetCookie && ($_COOKIE['lang'] != $sLang) && (SH_LANG_SET != $sLang) ){
define("SH_LANG_SET",$sLang);
setLangCookie( $sLang );
}
//EOF replaced
return $sLang;
}
//drop country
list( $sLang, $sCntr ) = explode( '-', $sLang, 2 ); // en-us => en
if( !$sLang or !$sCntr ) continue; //no lang or nothing changed
//check again. without country
if( checkLangExists( $sLang ) ) {
/* START replace
if( $bSetCookie )
setLangCookie( $sLang );
*/
if( $bSetCookie && ($_COOKIE['lang'] != $sLang) && (SH_LANG_SET != $sLang) ){
define("SH_LANG_SET",$sLang);
setLangCookie( $sLang );
}
//EOF replaced
now, the cookie is only being set, if it's not set already:
Set-Cookie: lang=deleted; expires=Mon, 16-Mar-2009 15:49:30 GMT; path=/
Set-Cookie: lang=en; expires=Wed, 16-Mar-2011 15:49:31 GMT; path=/
hope, this might be helpful for the one or the other ;-)