Install Wombat

Installation of Wombat is quite simple, it runs almost right out of the box. Simply download the Wombat package of your choice and check the system requirements.

Requirements

There are a bunch of dependcies to other PHP classes. But this is not a problem, see 3rd party libraries. Furthermore the Wombat framework rewquires PHP 5.2 or newer. To get the most out of Wombat, the Web-Server need full write permssions in var folder of your Wombat installation.

Furthermore, othere features have additional requirements. If you want to use database abstraction layer of Wombat, you obviously need a database and MySQLi support in PHP. This is also true for user logins and all the CMS features.

The Wombat Virtual File System (VFS) needs to figure out any file's mime-type. Hence it requires one of PECL extension FileInfo, the deprecated (in favour if FileInfo) PHP function mime_content_type or the Unix-Tools file. Wombat recomends FileInfo. VFS can handle any file type as just "files". Still, there is special support for images and videos. To convert, resze, etc images, the ImageMagick. Video transcoding, resizing etc. is done with FFmpeg. Both, ImageMagick as well as FFmpeg are widly used and can be found on almost every Linux based system with basic multimedia support.

Step 1: Install Wombat in SYSTEMDIR

That's easy! All you need is to put Wombat's files and folders in your SYSTEMDIR. There is file named SYSTEMDIR/include/WB/Class.php - this is the file that needs to be included later on.

Get Wombat as Download Archive

The first option is to install Wombat from a compressed archive. Download the archive that suits your needs from the Wombat download page and unpack it e.g. in you public_html folder. I like to stress, that the Wombat folder is refered as SYSTEMDIR

  unpack bzip2 compressed tar archive ...
$ tar jxf wombat-YYYYMMDD.tar.bz2

  ... or unpack gzip compressed tar archive ...
$ tar zxf wombat-YYYYMMDD.tar.gz

  ... or unpack zip archive
$ unzip wombat-YYYYMMDD.zip

  you probably want to rename/move this folder to SYSTEMDIR
$ mv wombat-YYYYMMDD SYSTEMDIR

Get Wombat Directly from SVN

Another option is to install directly from Subversion repository

$ svn co https://gerd.exit0.net/svn/wombat/trunk SYSTEMDIR
$ cd SYSTEMDIR

Step 2: Install Your Web-Site in BASEDIR

Now you need to setup your private BASEDIR. Wombat requires a minimal directory structure of your project.

Setting up a new site based on Wombat is always the same. Well, doing it manually is quite a good aproach and done in only a few minuts, still, the automaitc script can do this for you in seconds.

The Automatic Approach

Use your Web-Browser and go surf to Wombat's SYSTEMDIR. There is PHP-script called setup.php. Call this script and follow the guided tour. This installation tool will help you to create a very basic Wombat site. Optionally, you can setup a some extra features as well.

The Manual approach

Recomended (minimal) web-site directory structure:
Web-Site
 \
  + wbLoader.php
  + etc
  + etc-default
  |          \
  |           + config.xml
  |           + log.xml
  |           + site
  |                \
  |                 + page
  |                 + event
  + htdoc
  |     \
  |      + site.php
  |
  + template
  |        \
  |         + site.tmpl
  |         + Composite
  |         + Static
  |         + ...
  + var

The folder etc-default stores your web-site's config files. These files controll almost everything. Still, there is another folder named etc - use this folder allows to override config files in etc-default for your local installation. Hence it is good habit to keep this folder empty. The files etc-default/config.xml and etc-default/log.xml controll very basic features, therefore, these files are required. Start with copies from SYSTEMDIR/etc-default.

htdoc is meant to become your web-site's document root. In other words, this folder contains your index.php and probably some static content you plan to deliver to the web-browser. Name this folder as you wish and place it wherever you prefer. Still, we recommend that BASEDIR is not the same folder as htdoc. Otherwise visitors of your site may simply download your configuration files or other secred documents inside BASEDIR.

Wombat comes with patTemplate as template engine. Using it requires a folder where all template files are located, this is template.

Various features, like caching and the Virtual File System (VFS) need write-permissions to store their own files. Of course, granting writer-permissions to the web-server is a potential risk, therefore Wombat keeps write-permissions at a minimum. Hence Wombat requires a folder var with full access.

A minimal Wombat loader (wbLoader.php) should look like this:

The file named wbLoader.php is just for convinence. This file includes SYSTEMDIR/include/WB/Class.php and optionally manges some Wombat-parameters. Simply include this file from all your scripts located in htdoc.

Step 3: Be Creative

From now on, you are in charge! Use the Wombat-Framework as you wish. If you never used it before, the guide how to create a simple web site is a good start.

Make

Wombat comes with a Makefile to ease setup and maintainance. Of course, Make is completely optional, but bundles basic tasks and comes handy while working with Wombat.

Install

$ make install

Well, this simply creates all required folders and set write-permssions to var

Test

$ make test

Runs all Unit-Tests in SYSTEMDIR.

Flushcach

$ make flushcache

As you might guess, this wipes out all cached files