Install

Table of Contents

Requirements

The requirements for ReefChat are access to a server, preferably Linux based and for the database requires MySQL and the scripting language PHP

You can download MySQL here: http://dev.mysql.com/downloads

You can download PHP here: http://www.php.net/downloads.php

Get the ReefChat Files

The ReefChat source files are available here in either Tar or Zip format:

For screen reader functionality, I highly recommend the Fire Vox Screen plug-in for Fire Fox bundle available here: Fire Vox Screen Reader Bundle (XPI).

For help using Fire Vox, visit the Fire Vox Tutorial.

Configure Server

  1. Change to the directory you would like to have ReefChat installed and type:
    tar xvf reefchat.tar
  2. If you have Shell access login to MySQL, change to the database of your choosing, and run the below SQL commands to create the ReefChat tables. If you do not have Shell access you could run the SQL commands through a tool such as PHPMYAdmin.
    			CREATE TABLE chat_channel (
    				channel_id INT(12) NOT NULL AUTO_INCREMENT PRIMARY KEY,
    				timestamp TIMESTAMP(14) NOT NULL ,
    				channel_name VARCHAR(26) NOT NULL
    			) ENGINE = innodb;
    			
    			CREATE TABLE chat_users (
    				username VARCHAR(12) NOT NULL PRIMARY KEY,
    				password VARCHAR (12) NOT NULL,
    				chat_group VARCHAR (12) NOT NULL DEFAULT 'user',
    				active INT(1) NOT NULL DEFAULT '1',
    				idle_time varchar(5) DEFAULT '0',
    				channel_id INT(12) NOT NULL ,		
    				FOREIGN KEY (channel_id) REFERENCES chat_channel (channel_id)
    			) ENGINE = innodb;
    			
    			CREATE TABLE chat_messages (
    				message_id INT( 12 ) NOT NULL AUTO_INCREMENT PRIMARY KEY,
    				timestamp TIME NOT NULL ,
    				username VARCHAR(12) NOT NULL,
    				message TEXT NOT NULL,
    				channel_id INT(12) NOT NULL ,
    				FOREIGN KEY (channel_id) REFERENCES chat_channel (channel_id),
    				FOREIGN KEY (username) REFERENCES chat_users (username)
    			) ENGINE = innodb;
    			
    			CREATE TABLE chat_status_messages (
    				status_id INT(12) NOT NULL AUTO_INCREMENT PRIMARY KEY,
    				timestamp TIME NOT NULL ,
    				message TEXT NOT NULL,	
    				channel_id INT(12) NOT NULL,
    				FOREIGN KEY (channel_id) REFERENCES chat_channel (channel_id)		
    			) ENGINE = innodb;
    			
    			##Insert a SYSTEM user (required)
    			INSERT INTO chat_channel(channel_name) VALUES ('default');
    			

    Yes the table structure needs work - its on my to-do list.

  3. Edit db.php and look for the below lines

    $username = "yourUsername";
    $password = "yourPassword";
    $database = "yourDatabase";

    • yourUsername=your database user name
    • yourPassword=your database password
    • yourDatabase=the database where you create the ReefChat tables

Access ReefChat

Depending on where you placed ReefChat you should be able to access your install of ReefChat by going to http://yourDomain/yourPath/chat where yourDomain=the domain of your server, and yourPath=the path you installed ReefChat to.