The WebAbility® Network Developers - Documentation
WebAbility Site
Requirements & how to install Xamboo
Requirements:


To use Xamboo as your CMS dev framework, you will need:
- A webserver (Apache, nginx, etc.)
- PHP 5.3 minimum, PHP 7 recommended

Installation


Always download the latest version from github https://github.com/webability/xamboo

You will get a file with the format: xamboo-xx-yy-zz.tar.gz
Where xx-yy-zz is the current version of the framework.


1. Linux installation

1. Files

You must unzip the file xamboo-xx-yy-zz.tar.gz where you want to install the Xamboo.

When decompressing, it will creates a 'xamboo' folder with all the code inside.

This folder should not be in a public directory accessible by Web, either internet or local

Note: It is recommended to put the code xamboo is a directory one level above the same web site, or in a directory accessible by the web site.

2. Examples:

In your linux server with an Apache, you generally have a base directory website:

/var/www

or maybe

/var/htdocs


Unzip or ungzip xamboo in /var:

(download xamboo in any download directory)
mv xamboo-xx-yy-zz.tar.gz /var
cd /var
tar zxvf xamboo-xx-yy-zz.tar.gz

and you obtain:

/var/www
/var/xamboo


2. Installing the wrapper

Within xamboo, there are some folders, two of them (site and restsite) are used to be linked to the root of your website and rest-api website respectively. rest-api website is obviously optional. Install it only if you need it.
You can also use any other folder or path as you like, and copy the files present there in the root folder of you website directory.

For example, if you want to use your /var/www basic website root folder, you can copy the files present in /var/xamboo/site into /var/www:

Copy the index.php, Base.lib and .htaccess files in the public directory you have linked with your webserver:
They are already in /var/xamboo/site if you have linked this directory.

Edit the index.php file.
At the beginning of the file, there are 3 directories that link Xamboo settings.

Change directories to link the system xamboo folder where you have installed if needed, or modify the code to load it automatically from a config file.
By default, it will searches xamboo as the first parent directory of the website root dir.

If xamboo is installed in the directory above your site directory, it should work with the relative default path ../
However, if you installed the system on alternate directories, you may have to change paths to relative or absolute path to access the libraries.

index.php is an example and can be modified to what is required for the proper functioning of your site (eg user login, logs hits, configuration and directories from files, database connection, etc .)

The .htaccess file works the same way, it defines the rules to make the apache wraps to the index.
You can make an access file equivalent for other web servers if you do not use apache.

Please read below in the chapter "Reference - Wrapper" for the minimum requirements to run Xamboo and how to use it.


3. Install the base system

Within the xamboo/site directory, comes also a file Base.lib
This file contains the examples Base file, extended from xamboo\Base_engine in which you can add all the functionality you need for your own site in the global object accessible by all your classes.

You can leave the library at the root of your site (where you copied index.php) or you can protect it inside a folder of your choice not published on the web server (generally in xamboo/common).
It is just important that the index must have access to it, to load anything.

For example, move the Base object into the common application directory into xamboo, /var/xamboo/common/Base.lib and ensure the autoloader will be able to find it.


4. Examples of installation

1. Very basic installation

Just uncompress the downloaded file into /var and link the website root dir to /var/xamboo/site

/var/xamboo : Base directory installation
/var/xamboo/include : PHP Libraries
/var/xamboo/messages: Xamboo basic error messages
/var/xamboo/restsite : Root APISite directory
/var/xamboo/site : Root WebSite directory
/var/xamboo/repository : data repository directory


2. Advanced installation

Uncompress the downloaded file into a temporal stage and copy anything to /home/sites/my-site.com:

/home/sites/my-site.com : Base directory installation
/home/sites/my-site.com/site : Root website directory
/home/sites/my-site.com/restsite : Root website directory

/home/sites/my-site.com/include : PHP Libraries
/home/sites/my-site.com/include/base : put here the Base.lib (created)
/home/sites/my-site.com/include/entities : Singletons entities (access to databases, utilities, etc.) (created)
/home/sites/my-site.com/include/pages : Pages code for website (created)
/home/sites/my-site.com/include/__autoload.inc : Auto-load to search classes in several directories (Comes with Xamboo, can be modified to search anything used by your application)
/home/sites/my-site.com/repository : data repository application


You can locate pages within data repository or within the include, to suit your needs. The advantage of having them in the include is to backup all code beyond data that may be within the repository, which are usually bigger in size, but with a longer life cycle (images, caches, documents, etc)

Once the Xamboo is installed onto your web server you should see the default site example
http://my-site.com (considering your DNS and apache have been well-configured which is beyond the scope of this document)