Revision [4946]

This is an old revision of WikkaFAQ made by JavaWoman on 2005-01-22 19:00:36.

 

WikkaDocumentation Wikka Documentation

Frequently Asked Questions


This page hosts a list of FAQs, organized by topic.
Please post general issues and bugs to WikkaBugs.
Feel free to add your own questions, answers or both :)
 


Blank page (or truncated page) on free host


Then open /wikka.php and find this code at the end:
$content = ob_get_contents();
if (strstr ($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') )
{
    // Tell the browser the content is compressed with gzip
    header ("Content-Encoding: gzip");
    $page_output = gzencode($content);
    $page_length = strlen($page_output);
} else {
    $page_output = $content;
    $page_length = strlen($page_output);
}

// header("Cache-Control: pre-check=0");
header("Cache-Control: no-cache");
// header("Pragma: ");
// header("Expires: ");

$etag =  md5($content);
header('ETag: '.$etag);

header('Content-Length: '.$page_length);
ob_end_clean();
echo $page_output;
and change it as follows:
$content = ob_get_contents();
// if host inserts banner but supports gzip we prevent gzip encoding by setting 'allow_gzip' to '0' in the configuration
if (strstr ($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') && $wakka->config['banner_insert'] == '0')
{
    // Tell the browser the content is compressed with gzip
    header ("Content-Encoding: gzip");
    $page_output = gzencode($content);
    header('Content-Length: '.strlen($page_output));
} else {
    $page_output = $content;
    // if host inserts banner we don't want content-length calculation to prevent page truncation in the browser
    if ($wakka->config['banner_insert'] == '0')
    {
        header('Content-Length: '.strlen($page_output));
    }
}

// header("Cache-Control: pre-check=0");
header("Cache-Control: no-cache");
// header("Pragma: ");
// header("Expires: ");

$etag =  md5($content);
header('ETag: '.$etag);

//header('Content-Length: '.$page_length);        # moved
ob_end_clean();
echo $page_output;


Wikka



Text formatting







Comments



Translation





CategoryDocumentation
There are 40 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki