
 YggDore Sky Gate Login Test Server R-4

 Copyright (c) 2009 YggDore Co.,Ltd.
 All rights reserved.


 DESCRIPTION
 -----------

 The YggDore Sky Gate provides to login to outside services by click.
 The feature of it is as follows.

 1. It provides to login to outside service by click.
 2. It is simple login framework by REST.
 3. It provides login ID to outside services.
    The ID is changed per a service server's IP address or
    same domain network.

 This program is one of outside service and you are able to check login.

 It is written by PHP5.
 The demo site is http://www.ylogintest.com/
 The document site is http://www.yggdore.com/


 LICENSING
 ---------

 Please see the file called LICENSE.


 INSTALLATION
 ------------
 
 1. Requirements

    This program is written by PHP5 and used mysql.
    The following requirements exists for running this server.

    o PHP (later 5.2.3)

        Requirements modules of PHP are:
           mysqli (--with-mysqli=mysql_config_path)
           SimpleXML (--disable-simplexml must not set when installatin PHP)
           OpenSSL (--with-openssl=[DIR])
           
    o MySQL (later 5.0.45)

    o Apache

        Requirements environment running module of PHP.


 2. Configuration

    o First step, you need to decide as follows.

        - Database name of MySQL to manage data.

        - Database user name and password of MySQL to login database.

        - Disclosed directory path (URL) for web.
          It uses to interface of web service.

        - Path to store class files of PHP.
          This program has class files.
          Path must be top of directory
          that is included in include_path of PHP ( see. php.ini )

    o Configuration of multi language
    
        This program written by UTF8,
        Because it has pages of english and japanese.
        You should confirm internal string encoding of PHP.

        - PHP configuration (sample)
          output_buffering = Off
		  iconv.internal_encoding = UTF-8


 3. Installing database

    o Configuration of database name, user name and password
      in SQL scripts

      See mydata/mysql/credb.sql and mydata/mysql/creuser.sql.
      You rewrites default values in them.
      Default database name is "YS", name and password are "ys".

    o Run sql scripts as root

      % mysql -u root -p [password]
      [login...]
      > source credb.sql
      > source creuser.sql
      > use (database name)
      > source cretable.sql
      > source cresp.sql


 4. Copy program files
 
    o Copy htdocs/* to disclosed directory
    o Copy mydata/class to top of directory included in include_path.


 5. Configuration of this application

	o Rename the configuration file
	  from mydata/class/YggDore/Server/Config/Config.orig.php
	  to mydata/class/YggDore/Server/Config/Config.php

    o Configuration in mydata/class/YggDore/Server/Config/Config.php

        - YS_DBHOST
            Host name of the database

        - YS_DBPORT
            Port number of the database

        - YS_DBUSER
            User name to login to the database

        - YS_DBPASS
            User password to login to the database

		- YS_HOST
			This is specified host name for this machine.
			If it is empty, $_SERVER['SERVER_NAME'] is used.

		- YS_WORLD
			This is specified world name in which this service joins.
			If this server is stand alone, you should set it YS_HOST.
			If you has some machines or service and want to share ID on them,
			you should specified your domain name.

        - YS_HTTPPATH
			This is specified path of this service top directory.
			Images and pages links are created by it.
			The last character must not be slash.
            For example, if your top of this service URL is
            http://www.yggdore.com/demo/, this part is specified "/demo".

        - YS_HTTPURL
			This is specified URL of this service top directory.
			Images and pages links are created by it.
			The last character must not be slash.
            For example, if your top of this service URL is
            http://www.yggdore.com/demo/,
            this part is specified "http://www.yggdore.com/demo".

        - YS_HTTPSPATH
			This is specified path of this service top directory.
			Images and pages links are created by it.
			This is used when client connection type is SSL.
            For example, when your top of this service URL is
            https://ssl.hogehoge.com/www.yggdore.com/demo/,
            this part is specified "/www.yggdore.com/demo".

        - YS_HTTPSURL
			This is specified URL of this service top directory.
			Images and pages links are created by it.
			This is used when client connection type is SSL.
            For example, when your top of this service URL is
            https://ssl.hogehoge.com/www.yggdore.com/demo/,
            this part is specified
			"https://ssl.hogehoge.com/www.yggdore.com/demo/".
