Requirements
Installing UWiKiCMS requires an Apache 1.3 / PHP 4.3 server and a MySQL 3.23 database. Those versions are the minimum required, however it's likely that it will work with more recent software (Apache 2, PHP 5, MySQL 4). However, this hasn't been tested.
Default install assumes that the Apache server reads and understands .htaccess files in the DocumentRoot, and that the ErrorDocument directive is accepted.
A PhpMyAdmin access or a good knowledge of how to write SQL requests "by hand" can help a lot, since some operations can only be achieved through low level database operations.
The configuration script only works under UNIX. This might not be convenient for Windows users. Quick answer: the day Windows will provide a decent scripting system, a solution might arise. Meanwhile, use Cygwin and/or GNU/Linux.
Download
Official releases of UWiKiCMS are available on:
- https://ufoot.org/software/uwikicms/download/
- https://download.savannah.nongnu.org/releases/uwikicms/
There is no CVS server for UWiKiCMS, instead a GNU Arch depot is available on http://arch.sv.gnu.org/archives/uwikicms/ . To get the latest development version, type commands like:
tla register-archive http://arch.sv.gnu.org/archives/uwikicms/ tla get -A uwikicms@sv.gnu.org uwikicms--stable
How to install
PHP code
The ./configure script calls ./configure.php. Therefore php must be available as a command line tool in /usr/bin or so (php4-cli package under Debian for instance).
This is what ./configure.php does:
- copy .htaccess-dist files to .htaccess
- copy config.php-dist files to config.php
- modify these files on the fly if needed
So if the script does not work, don't panic, you only need to copy "-dist files" to "without -dist files", and edit them by hand.
./configure accepts options of the form --key="value", see the different scripts in ./misc to get an idea of how it works. I use these scripts to parameter my own personal sites. Copy one of these scripts and modify it at will. As these scripts are actually used, there are likely to be up to date, unlike any documentation 8-)
Available options follow:
- --siteurl=... : the protocol (http or https) + the domain name, for instance https://ufoot.org .
- --htprefix=... : the root path of your UWiKiCMS site, without the domain name, for instance if the complete url of the desired home page is https://ufoot.org/uwikicms , use --htprefix=/uwikicms
- --dbprefix=... : allows you to handle sub-sites. I used this for instance to make a sub-section of the main site appear under its own path. With --dbprefix=/perso/ufo only that sub-section of the main site is shown.
- --dbhost=... : the name of the MySQL server (DNS)
- --dbname=... : the name of the MySQL database
- --dbuser=... : the user used to connect to MySQL
- --dbpasswd=... : the password used to connect to MySQL
- --images_dir=... : the path used to access the various buttons and other background images, by default it points to "/_uwikicms/template/images/default" (allows you to handle themes).
- --css_dir=... : the path used to access CSS pages, by default "/_uwikicms/template/css/default" (same as previous, allows you to handle themes).
- --copyright_holder=... : a name which will be used for copyrights (copyleft!) by default.
- --debug : turns "debug" mode on. Basically PHP will print more errors, warning and messages. This is the default mode.
- --release : turns "release" mode on. Not very convenient when testing since PHP keeps mute, but very useful for production use.
Once the configuration is done, put all the files on the PHP server, using ftp for instance.
Note that there's some black magic in UWiKiCMS, and that it's very important that the .htaccess file at the root of your website exists, and that it contains the right value for the ErrorDocument directive. If not, nothing will work.
Database
There's no such thing as a "back-office" for the super administrator in UWiKiCMS, which would allow you to handle users. The basic reason is that anything I would have written myself would have been much less efficient than the genuine PhpMyAdmin.
Before installing you need to edit ./sql/mysql.sql and:
- either suppress all lines beginning by "INSERT INTO uwikicms_user..." and postpone the problem of creating users
- either modify these lines directly, using your own values. The thing you really need to change are passwords (values passed to MD5 function), or else anyone will be able to log on your site using "admin/admin", which is far from being secure.
Pass this script on the MySQL server.
Drink coffee.
First connection
Try to access your web site URL, which is in fact the concatenation of $siteurl and $htprefix (remember, the values passed to ./configure...).
Logically you should get a "404 Not found" error, in its UWiKiCMS flavour (that is you should read UWiKiCMS at the bottom of the page). This error is normal, since you haven't created any content yet. Click on "Connect", a login form appears. Type the user/passwd of your administrator profile (by default admin/admin, highly secured). "Continue". Now you should see a page creation form with "No title". Edit this document, it will be your home page.
Last test, try to access $siteurl$htprefix/titi/toto. Basically, if your site is installed on "localhost/foo", try to get "localhost/foo/titi/toto". If you get the same error page as previously (the UWiKiCMS flavoured 404 page), everything's fine. If you get Apache's default 404 page, there's something wrong with the file "localhost/foo/.htaccess".
Now, everything is up and running, it's over.
Toy around, try things without bothering to read the manual (I would have done the same), UWiKiCMS has few features so that you can master all of them quickly.
Users handling
No "back-office", why?
Simply because by coding a "add user, modify user, delete user" interface, I would have felt like reinventing the wheel.
The UWiKiCMS typical use is two or three contributors managing a single website. UWiKiCMS is very poor in terms of collaborative work, so it's globally not designed for massive multi-users usage.
In this context, managing users through PhpMyAdmin seems acceptable, if not preferable.
Structure of uwikicms_user table
;user_id:the login used to connect. ;user_passwd:the corresponding password, crypted with MD5 ;user_label:the users label (ie firstname + lastname) ;user_copyright_holder:the copyright holder for all contents edited by this user. Note that UWiKiCMS displays a message at the bottom of every page, which basically says that the document is "copylefted" (using the GNU FDL) and that the copyright belongs to this defined "copyright holder". To change this behaviour, you need to edit the code, which is perfectly allowed and possible. ;user_email:the user's email. It's not necessary to define it, especially if one wishes to escape the 500 tons of spam which will undoubtedly fill any mail box that is publicly displayed on the web. ;user_status:the user's status, ranging from 0 to 3. ;user_domain_regex:for status 2 contributors, defines the sections they're allowed to edit.
The user_status has the following meaning: ;"0":anonymous, creating such a user does not make any sense ;"1":visitor, invited. That type of user cannot edit content, but they can read all the "password protected" documents. Typically I use this profile to publish informations which are not highly confidential but must not be harvested by robots nor seen by absolutely anyone. I spread the password widely and do not really care if someone steals it. ;"2":contributor. These users can edit content. It's possible to "sandbox" them and limit the sections they're allowed to edit. This is achieved by editing a regex (regular expression). For instance to limit edition to the toto zone, the regex "/toto" is just what you need. ;"3":administrator. Can do anything. Can edit "confidential" content, which can only be seen by an administrator.
Practical examples
Here are a few SQL requests which show basic user management:
Creating a contributor: INSERT INTO uwikicms_user (user_id, user_passwd, user_label, user_copyright_holder, user_email, user_status, user_domain_regex) VALUES ('toto',MD5('0+0=0'),'Mr Toto','Toto','toto@ufoot.org',2,'/toto');
Changing password: UPDATE uwikicms_user SET user_passwd=MD5('lateteatoto') WHERE user_id='toto';
Deleting user: DELETE FROM uwikicms_user WHERE user_id='toto';