Documentation

Follow these steps to get up and running with Classroombookings.

Installation

Ensure that the web server, PHP and relevant modules, and MySQL are installed, enabled and configured.

Create the database

Create an empty database to use for Classroombookings. It’s easy to do this in a management interface like phpMyAdmin, Adminer or HeidiSQL, but it can also be done through the command line:

$ mysql -u root -p
Enter password:
mysql> CREATE DATABASE crbs;
mysql> GRANT ALL PRIVILEGES ON crbs.* to 'crbs_user'@'localhost' IDENTIFIED BY 'P@55w0rD';

Make a note of the username, password and database name that you used, they will be needed later.

Extract files

The Classroombookings files need to be placed on the web server, ideally in their own directory. For example, www.example.sch.uk/classroombookings.

If you have command line access to the web server, you can copy the archive to an appropriate directory, and extract the contents:

$ cd /var/www
$ mkdir classroombookings
$ cd classroombookings
$ tar zxvf classroombookings-version.tar.gz

If you do not have command line access, extract the archive to a folder on a computer. Use a file transfer utility such as WinSCP or Filezilla, to transfer all of the files to an appropriate directory on the web server.

Edit configuration

There are two configuration files that are required. There are example versions at system/application/config/config.default.php and system/application/config/database.default.php. Rename these to config.php and database.php.

Edit both of the files and change to suit your configuration, as outlined below.

config.php

Update the two variables to reflect your installation URL and the use of clean URLs. If you are not using clean URLs, leave index_page as it is.

/!\ Note: The base_url value must end with a forward slash.

// Full URL to your installation
$config['base_url'] = 'http://www.example.com/classroombookings/';

// Empty string if using mod_rewrite in .htaccess to enable clean URLs
$config['index_page'] = 'index.php';
database.php

Change the values here to match your database configuration - the database details from earlier should be entered into here.

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'crbs_user';
$db['default']['password'] = 'password';
$db['default']['database'] = 'crbs';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['active_r'] = TRUE;
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;

Optional step: enable clean URLs by enabling mod_rewrite via .htaccess (Apache server)

If you want to use clean URLs (that is, removing the index.php part of the address), rename _.htaccess to just .htaccess.

Edit .htaccess and change the URL to reflect where Classroombookings is installed for the RewriteBase directive.

If installed at a subdirectory, make sure it has a leading and trailing forward-slash. If it’s installed at a subdomain, it should just be a single forward slash.

For example, if Classroombookings was installed at http://www.example.com/classroombookings/ then you need to change the RewriteBase entry to reflect the installation path (see example below).

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /classroombookings/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

Filesystem Permissions

The web server will need write permissions to the folders listed below, in order to allow photos and files to be uploaded. The example below shows how to enable this via the command line, but it should be possible to do this with a file transfer utility like WinSCP or Filezilla.

$ cd /var/www/classroombookings/
$ chmod -R 775 webroot/images/roomphotos
$ chmod -R 775 webroot/images/schoollogo
$ chmod -R 775 webroot/images/bg
$ chmod -R 775 system/cache
$ chmod -R 775 temp

Run installation procedure

Using a web browser, navigate to the URL where you installed Classroombookings to. You will be presented with the installation page.

Complete the required fields, and click Install. Once the install process has finished, you will need to remove a file from the Classroombookings directory. Using the file transfer utility or the command line, remove system/application/controllers/install.php.

Announcements

v1.0.7 available
10 April 2015

Version 1.0.7 released - bug fixes

v1.0.3 available
20 May 2014

Version 1.0.3 released - mainly fixes an installation issue.

v1.0.2 available
10 June 2013

Version 1 has just been updated with a minor bug fix.

View all updates