«ДокуВики» — Настройки: safemodehack | Participants
|
- Statistics
- Participants
- Translate into Russian
- Translation result
- 13% translated in draft.
If you do not want to register an account, you can sign in with OpenID.
DokuWiki — Configuration Setting: safemodehack | ||
====== Configuration Setting: safemodehack ====== | ||
This tries to solve bug [[bug>179]] where DokuWiki can not write to directories it created itself. It does so by using FTP to log into your server and creating the directory that way. It requires the FTP PHP module to be installed on the server. | ||
--------- | ||
* Type: Boolean | ||
* Default: 0 | ||
As the name suggests, this is a hack and not recommended. Safemode itself is a setting that even the developers of PHP despise, it will be removed from future PHP versions all together. | ||
If you can, disable PHP's safemode instead of using this hack. Many providers will disable it for your site if you ask them nicely. | ||
===== When to use this hack ===== | ||
On some hosts with restrictive settings there are limitations on PHP's filesystem functions, e.g. mkdir() etc. To be more specific, the settings are: | ||
- safe_mode = On | ||
- safe_mode_gid = Off | ||
A first indication for the need of the SafeMode Hack is the encounter of error messages like this: | ||
Writing ....../data/cache/9/9243162ecf6295fc6a1c487ca46c20fe.i failed | Writing ....../data/cache/9/9243162ecf6295fc6a1c487ca46c20fe.i failed | |
The directory ''..../data/cache/9/'' will exist((check this, if doesn't exist you probably have a different problem)) but it will not be writable by DokuWiki. This is a typical symptom of the safe mode restriction. DokuWiki can't write to directories created by it self. | ||
===== Usage ===== | ||
To enable it, set ''safemodehack'' to ''1'' and enter your FTP credentials into the config file. (i.e. ''conf/local.php'' Or just go to the [[plugin:config|Configuration Manager]], which offers a great GUI for changing settings of DokuWiki.) | ||
If you have already tried running DokuWiki without the [[safemodehack|Safemodehack Option]], you have to **remove the subdirectories of /data/cache** to have them recreated with the correct UID in order for everything to work. | ||
Example Config: | ||
<code php> | ||
$conf['safemodehack'] = 1; | ||
$conf['ftp']['host'] = 'localhost'; | ||
$conf['ftp']['port'] = '21'; | ||
$conf['ftp']['user'] = 'user'; | ||
$conf['ftp']['pass'] = 'password'; // plain text (see below) | $conf['ftp']['pass'] = 'password'; // простой текст (см. ниже) |
© Андреас Гор и сообщество «ДокуВики». License: CC Attribution-Noncommercial-Share Alike 3.0 Unported

— Логин должен быть набран только с использованием латинских символов, поэтому — user; переводить не надо. — alexgearbox