The chat uses sessions. To make sessions work with Free.f,r users should
create a folder named sessions
on the root of their site.
Use the ftp command mkdir sessions
to create the folder.
For windows users, have a look to this link or this link.
By default, the chat data (messages and nicknames) are stored into
phpfreechat/data/private/chat/
but this path is customizable.
On linux it exists an interesting feature which will improve drastically the filesystem performances, this is tmpfs. In fact, it is a memory based filesystem, the read/write access will be very fast but your data will be lost on the next reboot.
On my Linux box (debian, kernel-2.6.x), a default tmpfs
filesystem is mounted on /dev/shm
so I suggest to configure
phpfreechat to store chat data into this directory. To do that, just add this
parameter :
$params["serverid"] = md5(__FILE__); $params["data_private_path"] = "/dev/shm/mychat"; $chat = new phpFreeChat($params); [...]
For your information, I did a benchmark test :
By default, the channel
parameter is auto-generated (based on
the title
parameter), but it's possible to specify it in order
to create totaly independants channels.
To handle multiple independant channels into one script passing the channel name by URL, just configure the chat like this :
$params["serverid"] = md5(__FILE__); $params["channel"] = $_GET["channel"]; $chat = new phpFreeChat($params); [...]
When browsing the script, for exemple
http://.../mychat.php?channel=myroom
, a totaly private chat will
be created and data will be stored into
phpfreechat/data/private/chat/myroom/
.
Rehash is needed when you change a value in your parameter list. If you don't rehash the chat, the old value will be used because the chat uses a cache.
To rehash the chat, you just have to run:
/rehash
However, you must be admin to run this command. To identify yourself as an admin, by default (if you didn't change the admin password) you just have to run these commands:
/nick admin /identify
(by default, the admin user don't have any password, but you can change it)
Administrators (user/password) are defined in the admins
parameter array.
Example: suppose I want to make bob
and boby
admins with bob1
and boby1
as paswords. I just have
to add this parameter:
$params['admins'] = array('bob' => 'bob1', 'boby' => 'boby1');
(don't forget to rehash your chat)