FLAT DB
           This 
          README file regards Flat DB users and this is all information you need 
          to get Flat DB up!
          
          Installation:
             Before you can use Flat DB you may need to install 
          only one standart module:
          That is DBI 
          (you need it to run properly DBD::Sprite. On most systems DBI module 
          is already installed!)
          After successful installation you have to make your own database:
          
           You have 'system' database with webtools installation(don't use 
          it...create new one comply with your OS):
           Database: webtoolsdb
           User: user
           Password: pass
          
          STOP: Use Web based script install.cgi introduced 
          in WebTools ver. 1.16 to manage config.pl file and to create base structure 
          of Flat database!
          
          Because Password is crypted you can't change it in your 'system' DB, 
          so you must create your own database when you use this DB engine for 
          professionl purposes!
  To 
    create your own DB you have to follow next steps:
       cd   to_your_webtools/db/
             rename or move 
          system DB: webtoolsdb.sdb and it's tables: 
          webtools_sessions.stb webtools_users.stb 
          to some other place/directory (we need to use the same names for DB 
          and tables: only for example purposes)
       cd   to_your_webtools/db/structures_directory 
    
          and remove old webtoolsdb.sdb (if available)
    
    NOTE: You can choose your own names for database and/or tables, but 
    you must change that names where is needful! I.e. you need to edit config.pl 
    and don't forgot to change $webtools::sql_user and $webtools::sql_pass. 
       User name and password in config.pl MUST be the same as 
    webtools_user 
    and its_password 
    in code below!
    
  Please 
    configure follow sections of '../../conf/config.pl':
    
    #[Name_Of_Project]
          $webtools::projectname = 'webtools';     # 
          Name of project! (be careful what exacly you write here!) 
  #[SQL]
    $webtools::db_support = 'db_flat';          
      # Driver for Flat DB support
    $webtools::sql_host = 'localhost';             # 
    Your address to SQL server.
    $webtools::sql_port = '3306';                     # 
    Your port of SQL server.
    $webtools::sql_user = 'webtools_user'; 
      # Don't forget user!
    $webtools::sql_pass = 'its_password'; 
        # and password
    $webtools::mysqlbequiet = '1';                   
    # MySQL be QUIET?
  #[DataBase]
    $webtools::sql_database_sessions = $webtools::projectname.'db';   
        # Database name.
    $webtools::sql_sessions_table = $webtools::projectname.'_sessions'; 
    # Session table.
    $webtools::sql_user_table = $webtools::projectname.'_users';               # 
    Contain all users (and admin too).
  NOTE: 
    Before countinue you must edit webtoolsdb-flat.pl 
    file, because it contain default admin user name and password.
    
          Now run perl makesdb.pl and insert 
          follow data:
    
              Database name: 
    webtoolsdb
              Database user: 
    webtools_user 
    ( user)
              User 
    password: its_password 
    ( pass)
              Database 
    path: /full_path_to_webtools/db/ 
    (eg: '/usr/local/apache/cgi-bin/webtools/db/')
              Table 
    file extension (default .stb): ENTER
              Record delimiter 
    (default \r\n): ENTER
              Field delimiter 
    (default ::): ENTER
          Press ENTER again to leave script (sometimes ctrl+d 
          and enter) or continue with entering another 
          DB users.
    
         
          Now you have to create webtools_sessions 
          and webtools_users tables, so first copy 
          new database webtoolsdb.sdb to ../ 
          directory (i.e. to db directory) and then:
          
          run perl webtoolsdb-flat.pl and this must 
          create for you wished tables!
          (please 
          be convinced that variable $webtools::check_module_functions 
          in config.pl has 'off' value. After execution 
          of line above please turn $webtools::check_module_functions 
          to 'on' again).
          You need 'off' value when everything is 
          OK and you want to use WebTools in "normal" mode!
          
          That's 
          all!
          
        --------------------------------------------------------------------------------
          Configuration, 
          step by step example:
          Installation of webtools I assume is in /usr/local/apache/cgi-bin/whtml
          cd /usr/local/apache/cgi-bin/whtml/
          pico conf/config.pl
                  edit 
          follow vars to:
                  $webtools::projectname = 'webhtml'; 
          
                  $webtools::sql_user = 'mynewuser';
                  $webtools::sql_pass = 'mynewpass';
          rm db/webtoolsdb.sdb
          rm db/webtools_sessions.stb
          rm db/webtools_users.stb 
          cd db/structures/
          perl makesdb.pl
                  Database 
          name: webhtmldb                   (must 
          be same as $webtools::projectname plus 'db' at the end!!!)
                  Database user: mynewuser
                  Database password: mynewpass
                  Database path: /usr/local/apache/cgi-bin/whtml/
                  Table file ext: ENTER
                  Record delimit: ENTER
                  Field delimite: ENTER
                  Database user: ENTER
          cp webhtmldb.sdb ../
          pico webtoolsdb-flat.pl
                  edit 
          follow vars to: 
                  $webtools::admin_user = 'myadmin';
                  $webtools::admin_pass = 'mysecretadminpassword';
          pico ../../conf/config.pl
                  edit follow var to:
                  $webtools::check_module_functions 
          = 'off';
          perl webtoolsdb-flat.pl
          pico ../../conf/config.pl
                  edit 
          follow var to:
                  $webtools::check_module_functions 
          = 'on'; 
          Ok, now write down in your browser: 
          http://www.your_host.com/cgi-bin/whtml/process.cgi
          and see what process.cgi with $webtools::check_module_functions = 'on' will show 
          to you.
          You should see "Test DB Engine...looks good" : This line mean 
          that webtools can connect, insert, select, update and delete rows from 
          your database throught driver you selected in config.pl
          Note: If you don't configure you config.pl file properly you will get 
          errors and warnnings!
          If your config.pl is properly configured you can turn $webtools::check_module_functions 
          "off" !
          pico ../../conf/config.pl
                  edit 
          follow var to:
                  $webtools::check_module_functions 
          = 'off'; 
          
          Unix/Linux-WIN/DOS 
          Legend: 
              cp <-> copy
              rm <-> del
              pico/vi/mcedit <-> notepad.exe/edit.exe
              / <-> \
          --------------------------------------------------------------------------------
          
           Actualy configuration of Flat DB is harder than other DB engines, 
          but some times you can use only simple flat, text files :| and no SQL 
          DB engine available. Also Flat DB is absolutely FREE :-)
        I 
          hope evrything is ok and now you can run your tests/examples...enjoy!
          
          Author:
          julian@proscriptum.com