This is an old revision of the document!


DokuWiki

This article describes how to install Dokuwiki on Free.fr

dokuwiki is a great wiki: lightweight, no need for SQL databases (all in text files) and easy to customize. So, naturally, I wanted to use it on Free.fr.

Unfortunately, it won't work there straight of the box (because of free - to my understanding): you have to install a patch.

  • Download dokuwiki, upload its directories to your home page on free.fr
  • Unzip it, and upload the bin, inc and lib directories to your home page on free. Overwrite existing files.
  • Create a “session” directory at dokuwiki's root, erase “data/locks”, enable PHP 5 (i.e write php 1 in .htaccess)
  • Launch dokuwiki's install (install.php) and then erase the install.php file.
  • It's possible to move out most directories of DokuWiki, see the security page.

It works !

Upgrading DokuWiki

Upgrade messages usually appear when you login. I successfully upgraded DokuWiki using the procedure detailed here. It just works without any problem, though I strongly recommend to backup your wiki first, in particular:

  • .htaccess
  • conf/local.php
  • conf/users.auth.php
  • conf/dokuwiki.php
  • doku.php

Also, remove unnecessary files listed in that link. Additionally, no need to upload install.php when you're doing an upgrade !

Finally, you have to patch lib/plugins/config/settings/extra.class.php. At line 50, replace glob by safe_glob and add the function's code:

//safe_glob() by BigueNique at yahoo dot ca
//Function glob() is prohibited on some servers for security reasons as stated on:
//http://seclists.org/fulldisclosure/2005/Sep/0001.html
//(Message "Warning: glob() has been disabled for security reasons in (script) on line (line)")
//safe_glob() intends to replace glob() for simple applications
//using readdir() & fnmatch() instead.
//Since fnmatch() is not available on Windows or other non-POSFIX, I rely
//on soywiz at php dot net fnmatch clone.
//On the final hand, safe_glob() supports basic wildcards on one directory.
//Supported flags: GLOB_MARK. GLOB_NOSORT, GLOB_ONLYDIR
//Return false if path doesn't exist, and an empty array is no file matches the pattern
function safe_glob($pattern, $flags=0) {
    $split=explode('/',$pattern);
    $match=array_pop($split);
    $path=implode('/',$split);
    if (($dir=opendir($path))!==false) {
        $glob=array();
        while(($file=readdir($dir))!==false) {
            if (fnmatch($match,$file)) {
                if ((is_dir("$path/$file"))||(!($flags&GLOB_ONLYDIR))) {
                    if ($flags&GLOB_MARK) $file.='/';
                    $glob[]=$file;
                }
            }
        }
        closedir($dir);
        if (!($flags&GLOB_NOSORT)) sort($glob);
        return $glob;
    } else {
        return false;
    }   
}

This function is taken from this URL on the good advice of this website.

 
Back to top
tools/dokuwiki.1235307847.txt.gz · Last modified: 2009/02/22 14:04 by axelle
 
 
Get OpenSolaris Recent changes RSS feed Valid XHTML 1.0 Driven by DokuWiki chimeric.de = chi`s home
(c) A. Apvrille - 2009