Skip to content
Frug edited this page Oct 10, 2012 · 1 revision

Table of Contents

Creating the database tables using the installation script

Execute the provided installation script by visiting the following URL with your browser:
http://example.org/path/to/chat/install.php
Replace http://example.org/path/to/chat/ with the real URL to your chat directory.

Important:
Make sure you delete the file install.php from your chat directory on the server after installation.

As an alternative, you can use phpMyAdmin to create the database tables.

Executing the provided SQL script with phpMyAdmin

On phpMyAdmin, select your database and click on "Import".
Select the file chat.sql from your local harddisk and click on "OK".
This should execute the included commands to create the tables needed by this chat.

Handling SQL errors on installation

Some users have reported that they had to remove the charset and collation settings from the SQL file
If you too encounter errors, you might give it a try and edit chat.sql before you use it with the installation script or in phpMyAdmin:

DROP TABLE IF EXISTS ajax_chat_messages;
CREATE TABLE ajax_chat_messages (
   id INT(11) NOT NULL AUTO_INCREMENT,
   userID INT(11) NOT NULL,
   userName VARCHAR(64) NOT NULL,
   userRole INT(1) NOT NULL,
   channel INT(11) NOT NULL,
   dateTime DATETIME NOT NULL,
   ip VARBINARY(16) NOT NULL,
   text TEXT,
   PRIMARY KEY (id)
);

DROP TABLE IF EXISTS ajax_chat_bans;
CREATE TABLE ajax_chat_bans (
   userID INT(11) NOT NULL,
   userName VARCHAR(64) NOT NULL,
   dateTime DATETIME NOT NULL,
   ip VARBINARY(16) NOT NULL
);

DROP TABLE IF EXISTS ajax_chat_invitations;
CREATE TABLE ajax_chat_invitations (
	userID INT(11) NOT NULL,
	channel INT(11) NOT NULL,
	dateTime DATETIME NOT NULL
);

Note: If you changed the names of the AJAX Chat database tables in your configuration file (lib/config.php) you need to adjust the file chat.sql as well.