[dokuwiki] Re: <?php echo DOKU_BASE?> ???
- From: "Harry Fuecks" <hfuecks@xxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Thu, 23 Mar 2006 12:17:04 +0100
On 3/23/06, Bill Jones <tetragondzein@xxxxxxxxx> wrote:
> If the site's DocumentRoot is the same as the doku_base is there any
> advantage to using <?php echo DOKU_BASE?> instead of a plain /
The main advantage is some ability to put parts of dokuwiki in
different locations on your filesystem (e.g. putting the conf
directory outside of the document root) without having to modify the
source code - have put some notes below which hopefully illustrate
this.
> Whic is faster or more compatible in the long run?
You approach is will be faster but as said, not significantly so
compared to other stuff happening in Dokuwiki.
> Or is this something I should only worry about if I needed to move the
> doku_base to another directory?
To answer that perhaps this helps. This is roughly how I installed
dokuwiki on a server running debian, where I had root access.
1. Created a file /usr/local/lib/dokuwiki/prepend.php containing
<?php
define('DOKU_INC','/usr/local/lib/dokuwiki/');
define('DOKU_CONF','/etc/dokuwiki/');
?>
This I have php automatically prepend (see next step) meaning this
constants have my values not the Dokuwiki defaults
2. Modified /usr/local/php5/lib/php.ini for the following settings;
auto_prepend_file = /usr/local/lib/dokuwiki/prepend.php
error_log = /var/log/dokuwiki
error_reporting = E_ALL & ~E_NOTICE | E_STRICT
display_errors = Off
log_errors = On
ignore_repeated_errors = On
3. In /usr/local/lib/dokuwiki put the 'inc' and 'lib' subdirectorys
then created a link from /var/www/mysite.com/lib to
/usr/local/lib/dokuwiki/lib
4. For the configuration files in the conf subdirectory, renamed and
located this directory at /etc/dokuwiki so I have acronyms.conf, for
example, located at /etc/dokuwiki/acronyms.conf (you'll need to change
permissions on acl.auth.php and users.auth.php to allow access for the
apache user)
5. For the data directory renamed and located at /var/lib/dokuwiki so
I have, for example, /var/lib/dokuwiki/pages containing the wiki page
files. Updated /etc/dokuwiki/local.php to point at this directory -
probably would have been a little smarter to use /var/local/dokuwiki
but anyway. Again permissions need setting on these directories.
6. Finally in /var/www/mysite.com (the document root for the web
server) copied the real files doku.php feed.php and index.php
(figure here it's slightly quicker not to use symlinks) - thanks to
the auto_prepend_file directive in php.ini, I don't need to modify any
of these files.
Anyway - perhaps that's useful.
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- References:
- [dokuwiki] <?php echo DOKU_BASE?> ???
- From: Bill Jones
Other related posts:
- » [dokuwiki] <?php echo DOKU_BASE?> ???
- » [dokuwiki] Re: <?php echo DOKU_BASE?> ???
- » [dokuwiki] Re: <?php echo DOKU_BASE?> ???
- » [dokuwiki] Re: <?php echo DOKU_BASE?> ???
- [dokuwiki] <?php echo DOKU_BASE?> ???
- From: Bill Jones