Python CGI Chat.
Requirements
MySQL
With effort, could be swapped out to a flatfile/sqlite3 database
Run Python scripts as CGI scripts.
Instructions:
Create a database. Modify db.py to point to it. This must be done in both the AuthDB and MessageDB classes.
If using MySQL, a file sqladmin must be created holding the password to the account used to login to your MySQL server.
Create a table today in said database with structure: INT id AUTOINCREMENT PRIMARY, TEXT usr, TEXT msg
Create a table users in said database with structure: INT id AUTOINCREMENT PRIMARY, TEXT usr, TEXT pw, TEST sessID
Deploy admin.html, page.html, and login.html to your webserver. Not that you must change all links in them to the appropriate links for your webserver.
Modify mainCGI.py, databaseEdit.py, authenticate.py, and seed.py so that they are applicable to your webserver.
Deploy mainCGI.py, db.py, databaseEdit.py, authenticate.py, and seed.py to your webservers ./cgi-bin directory.
Navigate to http://yourserver/path/login.html to begin.
Downloads:
Initial Release, Jan 2013
Troubleshooting:
Premature end of script headers:
Ensure that all files have unix style line endings, ie. “
”