Table of Contents

Quick start

This page is for 1.x phpfreechat versions. For 2.x versions, check the documentation

First of all, check that you have the correct required configuration.

Installation

  1. Get the zip (or tar.gz for unix users) archive from the download page
  2. Unzip the archive localy then upload the “phpfreechat-x.x” directory on your server into a browsable directory (public directory). Tip: if you have a SSH access, I suggest to untar the archives directly on the server usign “tar xzf phpfreechat-x.x.tar.gz” command.
  3. Give the web server's write permissions to “phpfreechat-x.x/data/public” and “phpfreechat-x.x/data/private” directories. If you are using FTP:
    CHMOD 777 phpfreechat-x.x/data/private
    CHMOD 777 phpfreechat-x.x/data/public

    If you are using SSH:

    chmod 777 phpfreechat-x.x/data/*

    Tip: On the latest version 1.x maybe it will not work and it will show you ”“Error: the chat cannot be loaded!…””, then try with 755 rights.

  4. Browse the “phpfreechat-x.x” directory with your browser and enjoy !

How to customize my chat

As you followed the above quickstart process, your chat script is located in : “phpfreechat-x.x/index.php

You chat script looks like this piece of code :

  <?php
 
  require_once "src/phpfreechat.class.php"; // adjust to your own path
  $params["serverid"] = md5(__FILE__); // used to identify the chat
  $chat = new phpFreeChat($params);
 
  ?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html>
    <head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
      <title>phpFreeChat demo</title>
    </head>
    <body>
      <?php $chat->printChat(); ?>
    </body>
  </html>

To customize your chat script, just open it and play with the parameters list. As an example, have a look to the demos scripts located in “phpfreechat-x.x/demo” directories.

Attention: when a parameter is modified/added, you have to rehash the chat in order to take into account the modification.