Giter Club home page Giter Club logo

chat's Introduction

simple chat system
------------------

1. I read following web site.
----------------------------
http://www.webdesignlibrary.jp/2006/12/php_mysql_chat_sys.php
http://www.webdesignlibrary.jp/2006/12/php_mysql_chat_sys.php

2. set up
----------
## I first install followings
emacs23
apache2
mysql-server
libapache2-mod-auth-mysql
libapache2-mode-php5
php5-mysql

## Second I enable apache module rewrite as
$ sudo a2enmod rewrite
$ sudo apachectl restart

## Finally I set up database
see db_info.php (http://github.com/cloverrose/chat/blob/42092ebe8fb72279352d29cfd9e345d442d3c96f/db_info.php) and

$ mysql -u <username> -p
<password>
> create database <dbname>;
> use <dbname>;
> create table chat(
> nick CHAR(10) NOT NULL,
> words CHAR(150)
> );


3. install Smarty and setup
---------------------------
http://d.hatena.ne.jp/NiwaHirokazu/20090425/1240671703

$ sudo apt-get install smarty
where is smarty installed as
$ dpkg -L smarty
and find the directory
/usr/share/php/smarty/


setup /etc/php5/apache2/php.ini as
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
include_path = ".:/usr/share/php:/usr/share/php/smarty/"

similarly set up /etc/php5/cli/php.ini as
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
include_path = ".:/usr/share/php:/usr/share/php/smarty/"
;

restart apache2
$sudo apachectl restart

check whether smarty works as
$ php -f smartytest.php
and if output nothing, it is OK.

chat's People

Watchers

cloverrose avatar

chat's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.