Every.py Chat installation and Readme

This assumes you already have python installed on your server.  Every.py Chat will not run unless python is properly installed.  Python is available almost for every platform at http://www.python.org and part of most Linux distributions.  If your ISP is not Python friendly, please read about mxCGIPython - One-file easy-to-install Python interpreter. Read the Python CGI FAQ for more information.


Step 1 - Unzip the files...

The first thing you need to do is decompress the files into the appropriate directories.  The archive includes the following files:

- readme.html - about the installation This does not have to go on your web server.

- chat.cgi - the script itself (uses messages.html to write messages) It should go in a cgi-bin directory or your shell CGI directory. 

- index.html

- frames directory containing:

The locations of these files will vary from system to system, but here are recommendations, and see the directory tree bellow:

Make a "chat" directory in your "public_html" directory.

- The green index.html file goes there.

Make a "frames" directory in your "chat" directory".

- The four orange files should go in this "frames" directory.

- The blue file, chat.cgi, should go in a cgi-bin directory or your shell CGI directory. 

My file structure for Every.py Chat looks like this:

[public_html]
......|-[chat] index.html
...........|-[frames]
..................|- top.html
..................|- board.html
..................|- bottom.html
..................|- messages.html   <-   chmod 666 messages.html 
|- [cgi-bin] 
.........|- chat.cgi       <- chmod 755 chat.cgi

Upload the script to your server as described above.


Step 2 - Change the permissions (UNIX only)

All of the orange files can stay their default permissions, except messages.html should be given write permissions, since the script must write new messages to the file.  You can do this using the following chmod command on your system:

        chmod 666 messages.html

The blue file, chat.cgi, should be given execute permissions, since the script must be run by remote users.  You can do this using the following chmod command on your system:

        chmod 755 chat.cgi




Step 3 - Configure EveryChat to run on your system

First, open chat.cgi with a text editor such as emacs, vi, notepad, etc.

In line 1, after the "#!" write your python interpreter physical location. For example, if you use One-file easy-to-install Python interpreter and it is in /home/user/public_html/cgipy/cgipython, I would write:

#! /home/user/public_html/cgipy/cgipython

(Generaly, you can write #!/usr/local/bin/python here, if Python is installed on your Linux or Unix system.)

In line 18, set notefile to the absolute directory of your messages.html file.  For example, if my messages.html file is in /home/user/public_html/chat/fremes/messages.html on my UNIX system, I would use:

notefile='/home/user/public_html/chat/frames/messages.html'

Please note that this is not server paths.  This should represent the actual physical location of the file, not the URL.

 

In line 22, set the server path to chat.cgi script. For example, if your cgi scripts are accessable under

http://cgi.domain.com/cgi-bin, I would use:

script='http://cgi.domain.com/cgi-bin/chat.cgi'

 

Next, open bottom.html with a text editor.

Change line 8 to point to your script.  Again, you are using the server path, or the URL.

<FORM ACTION="http://cgi.domain.com/cgi-bin/chat.cgi" METHOD="GET">.


Point your web browser to your URL. For example: http://www.domain.com/~user/chat

If you did everything correctly, it should work!

You can test and see it here online.


All of the files are distributed as-is with no warranties of any kind.

Author: Zsolt Hever, never@freemail.hu

Datum: 7 January 2001