Two problems often occur if you use the plugin manager to install fckgLite and may occur under other circumstances.
Solution: copy the following file to the fckg/fckeditor directory: :userfiles.tgz. Then extract it:
tar -xzf userfiles.tgz
This will copy the necessary links to the fckg/fckeditor/userfiles directory.
This document applies to both the image browser and the link tool, both of which depend on the same file browser for locating files on the server. The configuration script for this file browser is found in /fckg/fckeditor/editor/filemanager/connectors/php and is named config.php.
The problems encountered in setting up the file browser almost always relate to paths. The configuration script will attempt to implement the two paths described below automatically. But if that fails, this document describes what needs to be done.
If you are using a Linux system, before using the steps described below,try setting the winstyle option to true.
You may also have to copy the .htaccess file from fckg/fckeditor/userfiles to data/media. See the section of this document below which gives more details on how to do this: Image Display Issue using direct path.
Two Paths Required: absolute and relative. Both must refer to the same directory. On a Windows System the Absolute Path is the complete path from the Drive Letter to the data/media directory. On unix systems it starts at the root directory. The relative or UserfilesPath starts at the directory where your DokuWiki is installed and refers to the data/media directory: wiki/data/ media/. You replace 'wiki' with the name of your own dokuwiki directory. If it is in a subdirectory, then your relative path must begin with that subdirectory. In other words what you want here is the directory that would appear in the browser's url. If your web site is
and dokuwiki is accessed as
then your relative path is /dokuwiki/data/media/. But if the web address is
then your relative path is
What you want is the paths to your dokuwiki data/media directory.
On a Windows system the Absolute Path uses the Windows style with back-slashes, while the relative path uses the Unix-style with forward slashes.
Note: The PHP programming language requires two backslashes to represent a single backslash:
Both paths must be enclosed in single quotes and both paths must end with a slash–a single forward slash in the relative path and a double backslash in the Windows. The relative path must also start with a forward slash.
The absolute path is assigned to $Config['UserFilesAbsolutePath']. The relative path is assigned to $Config['UserFilesPath']
Example absolute paths
On Windows System:
On Unix/Linux System:
Example relative path
This is the path to user files relative to the document root. This must use the Unix style path, even on a Windows system, i.e. single forward slashes:
On both Unix-type and Windows systems you should be able to create symboloic links from fckg/fckeditor/userfiles to the moved data/media directory. In Windows (Vista and later) you can make symbolic links using the mklink command from the command propmpt window. In Windows, you can also make symlinks to shares using that same mklink command.
See these documents for possible further help:
If you are using a Windows system for Dokuwiki, and if you want to use symlinks from the userfiles directory, then set the nix_style configuration option to true: number 15.
The most efficient way to use a Windows Share for the data directory is to replace the current data directory with a Windows symlink that points at the share directory; this is possible only in post-XP versions of Windows. To do this you use the Windows mklink command in the Command Prompt window, run as administrator. See windows_systems for how to use mklink.
If you have previously installed fckgLite, you must remove the meta file which is created when fckgLite attempts to create symlinks on your system (see force_symlink_creation ). This will force fckgLite to create new symlinks which will now point to the media directory in the share. Now you must set the nix-style configuration option to true (configuration_options ).
When using a direct path through the Dokuwiki's /data/media directory, images will not immediately appear in the editor window. The document will first have to be saved, and then re-loaded into the editor. The reason for this is that the data directory and all of its subdirectories are governed by an .htaccess file that prevents direct access to its contents. For instance, if you put a url into your browser's location bar that tries to access an image from the media directory, you will get a “forbidden” message.
Add a .htaccess file to data/media/ with these lines:
<IfModule mod_authz_host> Require all denied </IfModule> <IfModule !mod_authz_host> Order allow,deny Deny from all </IfModule> <FilesMatch "\.(gif|jpe?g|png)$"> <IfModule mod_authz_host> Require all granted </IfModule> <IfModule !mod_authz_host> Order allow,deny Allow from all </IfModule> </FilesMatch> Options -Indexes
Consult the filebrowser security section for more details.
In the default configuration for unix-type systems, the configuration file uses the directory fckg/fckeditor/userfiles, which has a set of symbolic links that point to data/media. In this setup both absolute and relative paths point to the userfiles directory:
To utilize this configuration, Windows users in Vista and later can create symlinks use the command line tool named mklink. In XP, they must substitute what are called 'junctions' for the unix symbolic links. You can find out more about this configuration from the document on configuring for FCKeditor 2.5 But junctions can be dangerous to use, so take into consideration all the cautions.
On the Mac it may be necessary to change the ownership of the fckg/fckeditor directory:
chown -R _www fckeditor
If this doesn't work, use the Windows style setting explained above.
If you use the Debian or Ubuntu package manager to install Dokuwiki, there is currently a new distribution for this, which may still need a few tweaks but will eventually be integrated with the main distribution.
This solution has now been integrated into version 08 of fckgLite, which can be downloaded either from the dailies or from the download section of the introduction page.
A previous solution was a substitute directory for
fckeditor/editor/filemanager/connectors/php, which you can download here: connectors.php . The only files from this package that really have to be replaced are
connector.php. At the top of
connector.php, you will find the following code:
$is_ubuntu = false; $is_debian = false;
If you are using Ubuntu then change
true; if you are using Debian, then change
You are advised in these cases to do a manual install of fckgLite, and not to use the Dokuwiki plugin manager. If you use the plugin manager, you may get an error message saying that the image or file directory cannot be created because it already exists. If this occurs, you should go to fckg/fckeditor/userfiles and delete the broken links named media, file, and image and then create new symlinks named file and image that point to data/media.
On Lighttpd it may be necessary to set
$useWinStyle = true in config.php.
See Windows Style Configuration for Linux above.
The standard setup for unix-style installations uses symbolic links. But some systems come with very restrictive default settings which do not allow the use of symbolic links. This is true, for instance. of OpenSUSE. In order to deal with this, the Apache configuration file has be set up to allow for symbolic links with the Options FollowsymLinks directive. Or else it has to set AllowOverride to ALL, which will allow you to add the FollowSymLinks setting to your .htaccess file in userfiles. For more detail see the discussion of unix type systems in the filebrowser page. Also consult the Apache discussion of options.
You can check the paths that have been created by setting the variable $DWFCK_con_dbg to true: $DWFCK_con_dbg = true;
It's at the top of the config.php file. You will find this file in
fckg/fckeditor/editor/filemanager/connectors/php. It will create a text file named either win_paths.txt or nix_paths.txt, in the same directory as config.php, depending on which system's protocol it has used. Note: Be sure to turn it back to false; otherwise each time you access the file browser, it will re-write this file.
If you continue to have problems, contact the mailing list.