$Id: INSTALL,v 1.20.2.5 2005/07/08 14:46:49 kozlik Exp $

serweb - Installation

  Requirements:
  -------------

  - Apache web server
  - php 4.3 and later with support for mysql (php-mysql package)
  - PEAR package DB (should be included in PHP release 4.3 and later)
  - PEAR package LOG (optional - not included in PHP realase)
		see http://pear.php.net/manual/en/installation.getting.php for details
  - PECL package Classkit (only PHP5 users)
  		see http://www.php.net/manual/en/ref.classkit.php
  - MySQL 4.0 (we use UNIONs)
  - running SER with MySQL support


  Quick Install:
  --------------

    [1] Untar the distribution (be sure to untar the subdirectories)

    [2] It is recommended to be only 'html' directory accessible throught the 
	    HTML tree on your server. And leave other directories unaccessible
	    throught http. Do it by creating alias in your httpd.conf,
		for example:
	    	Alias /serweb "/your/serweb/dir/html" 

    [3] Open the file config_data_layer.php in your favourite editor and change
        the values for db_type, db_host, db_name, db_user and db_pass

    [4] Open the file config_paths.php and change value for root_path
        to fit directory in html tree where serweb is installed. Also change
        other values to fit your environment.

    [5] Open the file config.php and see if you wish to change some setting.
        If you want enable loging, make sure that you have installed
        PEAR package LOG. Make sure that your web server daemon has rights
        to write to file /var/log/serweb. Type these two commands:
            touch /var/log/serweb
            chown www-data /var/log/serweb

    [6] Follow this step if you are hosting more domains and wnat have 
	    diferent setting for some domain:
	    In subdirectory /your/serweb/dir/html/domains create
        directories named as domains you are hosting and copy to them content
        of subdir /your/serweb/dir/html/domains/_default. In this
        directories is files for domain depended configuration and layout
        of pages for each domain. If some file isn't found in directory
        /your/serweb/dir/html/domains/<domain> is used the one from
        /your/serweb/dir/html/domains/_default

        Open config.php for each domain
        (/your/serweb/dir/html/domains/*/config.php) and change setting
        to fit your environment. Don't forget change email address
        (mail_header_from, infomail, regmail) and contact address of instant
        messages (web_contact)

    [7] make sure your php.ini includes the following values:
            - short_open_tag = on
            
    [8] Open the file http://<your-host>/<your-install-dir>/admin/index.php
        or http://<your-host>/<your-install-dir>/user/index.php
        in your browser. Serweb should now display a login screen.
        The initial username is 'admin' with password 'heslo'. Its strongly
        recomended to change this password after first login.
        
        Notice: Do not replace '<your-host>' in url mentioned above by
        'localhost'. Use real name of the server instead of 'localhost'!!
		It is because serweb obtail domainname from this url and the domainname
		is also used for user authentication.
        
    [9] If everything work, is now time to create cronjobs. Follow instructions 
	    in file scripts/cron_job/INSTALL
	    

  User preferences (AVP)
  ----------------------
    If you need some function working with user preferences (i.e. variables
	status_vibility, usr_pref_forward_to_voicemail in config 
	file) you must fill db table usr_preferences_types by script 
		scripts/sql/usr_preferences.sql
	By command:
		mysql -u ser -pheslo ser < scripts/sql/usr_preferences.sql

  Config files notes:
  -------------------

  Config files are readed in this order:
	1. config_paths.php
	2. config_data_layer.php
	3. config.php
	4. domains/<domain>/config.php

  In domain depending config.php can be changed only values said
  in variable 'domain_depend_config' in main config.php. This is
  in order to admins of individual domains can't change other
  config values.

  If you aren't settle for automatic seting domain by server name in
  http request, you can change it in file set_domain.php.


  Frequently Asked Installation Questions:
  ----------------------------------------

  Q: What is the zone.tab file and where is it located.
  A: zone.tab describes timezones -- information needed to
     interpret time information correctly. Where it is stored
     depends on your OS, many distributions store it at
     /usr/share/zoneinfo/zone.tab. The file contains line-by-line
     country code, coordinates, names and optional comments, e.g.
     CZ  +5005+01426   Europe/Prague
     (You may want to get the file from other places like
     http://rpmfind.net/linux/lorax/i386/RedHat/instimage/usr/share/zoneinfo/zone.tab
     or ftp://elsie.nci.nih.gov/pub/)

  Q: I get this error: "call to undefined function :mysql-pconnect()"
  A: Do install php-mysql. Really.

  Q: I can't login into serweb by default username and password
  A: Please make sure your username, password and domain values are exactly 
     matched the values of your subscriber table.
       Probably your domain do not match. Serweb obtain domain 
     from http request by default. So the host in http request should
     be same as you are useing in SER. For details see file
     config/set_domain.php. You can also disable automatic obtaining
     domain and set it by hand here.

  Q: Still can't login into serweb by default username and password
  A: Enable loging in serweb ($config->enable_loging = true) and
     see log file. For more verbosity set log level to PEAR_LOG_DEBUG

  Q: When new user is subscribing throught serweb, still same alias is assigned
     to him.
  A: Make sure that usrloc module in ser is useing domain. Look up for this 
     option in your ser.cfg:
     
	 modparam("usrloc|registrar", "use_domain", 1)
 
  Q: How can I install PECL package Classkit?
  A: Type this command on command line:
       
	   pear install -f classkit
       
     If you get an error mentioning "phpize" you also might need to install 
	 some dev package, like php4-dev on Debian systems.
 
  Q: Package Classkit is installed, but serweb still reporting:
     Function aggregate_methods() doesn't exists. Try install Classkit extension. 
  A: Check if module is loaded in PHP. Check your php.ini for something like 
     this:
       extension=classkit.so
  
  Q: Serweb show error "DB Error: syntax error" on 'missed call' and 
     'accounting' tab.
  A: Check version of your mysql. Serweb need mysql >= 4.0
