This shows you the differences between two versions of the page.
|
tools:dokuwiki [2009/02/22 14:02] axelle |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== DokuWiki ====== | ||
| - | //This article describes how to install Dokuwiki on Free.fr// | ||
| - | |||
| - | [[http://www.splitbrain.org/projects/dokuwiki|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 [[http://www.splitbrain.org/projects/dokuwiki|dokuwiki]], upload its directories to your home page on free.fr | ||
| - | * Get [[http://forum.dokuwiki.org/post/1733|the patch from this forum]] [[http://www.dokuwiki.org/fr:install:free.fr|discuss]]. | ||
| - | * 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 [[http://www.dokuwiki.org/security|the security page]]. | ||
| - | |||
| - | It works ! | ||
| - | |||
| - | ==== Upgrading DokuWiki ==== | ||
| - | |||
| - | Upgrade messages usually appear when you login. I successfully upgraded DokuWiki using the procedure detailed [[http://wiki.splitbrain.org/wiki:install:upgrade|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: | ||
| - | <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; | ||
| - | } | ||
| - | } | ||
| - | </code> | ||
| - | This function is taken from [[http://fr.php.net/manual/en/function.glob.php|this URL]] on the good advice of [[http://www.dokuwiki.org/fr:install:free.fr|this website]]. | ||
| - | |||
| - | {{tags> dokuwiki, free, free.fr, patch, upgrade, wiki}} | ||