Revision [4942]
This is an old revision of WikkaFAQ made by JavaWoman on 2005-01-22 12:10:36.
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 :)
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
- I've installed Wikka on a free hosting service, and all I get is a blank page. Other (non-Wikka) pages do work, and show a banner of the hoster.
- When a (free) host inserts a banner, it interferes with two things Wikka does by default:
- when Gzip-encoding is active, inserting a banner just messes things up (causing the blank page); and
- Wikka calculates content-length for a HTTP header - which will be incorrect after the banner is inserted, so you would see a truncated page when Gzip is not active.
- A small change in the code can work around this.
First, open /wikka.config.php (after allowing write access on it!) and add the following line before the closing }:'allow_gzip' => '0',(and make the file read-only again after this).
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:
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;
$content = ob_get_contents();
// if host inserts banner but supports gzip we prevent gzip encoding by setting 'allow_gzip' to '1' in the configuration
if (strstr ($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') && $wakka->config['allow_gzip'] == '1')
{
// Tell the browser the content is compressed with gzip
header ("Content-Encoding: gzip");
$page_output = gzencode($content);
$page_length = strlen($page_output);
header('Content-Length: '.$page_length);
} 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['allow_gzip'] == '1')
{
$page_length = strlen($page_output);
header('Content-Length: '.$page_length);
}
}
// 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;
// if host inserts banner but supports gzip we prevent gzip encoding by setting 'allow_gzip' to '1' in the configuration
if (strstr ($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') && $wakka->config['allow_gzip'] == '1')
{
// Tell the browser the content is compressed with gzip
header ("Content-Encoding: gzip");
$page_output = gzencode($content);
$page_length = strlen($page_output);
header('Content-Length: '.$page_length);
} 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['allow_gzip'] == '1')
{
$page_length = strlen($page_output);
header('Content-Length: '.$page_length);
}
}
// 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;
- If you later move the site to another host that doesn't insert banners, just change the config to set 'allow_gzip' to '1' and you'll get gzip encoding enabled again, as well as content-length calculation.
Wikka
- Where did the name "Wikka" come from? Is is based on "Wicca"?
Text formatting
- How do you get a pair of double-quotes (without any text between them) to display properly ?
- Use the entity literal " - ""
Links
- How do you un-WikiName a word ?
- Add two pair of double-quotes around the word: WikiName
- How does WakkaWiki know to what URL to send a visitor to if it wasn't specified ?
- The link is to a forced WikiPage. That means a link to a page in this wiki is generated.
- So why does [[LALA_LELE]] send me to http://LALA_LELE ?
- The underscore breaks things. [[LALALELE]] doesn't have this problem.
Comments
- When I click on the [Add comment] link, wikka asks me, if I want to create this page instead of showing the comments-form
- Look into your wikka.config.php and set the entry 'rewrite_mode' => '1', to '0'. That should solve the problem .
Translation
- When will Wikka support other languages/utf-8 ?
- An internalization/localization project is currently under discussion, but it requires a major overhaul of the code, so don't expect it to appear in the very next releases.
CategoryDocumentation