Instructions      mySQL & PHP     my Knowledge Base
To install my Knowledge Base download the zip archive file knowledge.zip from: http://schick.tripod.com and unzip it into a new subdirectory on your Web server (ie. /kb).

Customize the file "knowledge.ini.php", the file "footnote.html", the file "top.html", select your own logo and change it with image "smile.gif" and your background image with "back.jpg" for the background of the Web pages and your are finished (if mySQL and PHP are installed and running on your Web server or localhost and the path for this Web application is aliased in the Web server's configuration menu or file). The file "knowledge.ini.php" could be modified by the HTML page file "install.html" and the related php script "install.php". The URL address for the installation on localhost by the install script is:

      http://localhost/kb/install.html      if your virtual Web directory is /kb

Write access (Unix/Linux: chmod 777 or chmod 755) on the Web directory for my Knowledge Base (ie. /kb) must be present during installation.

There must grant permissions to a user of mySQL with the userid from the init file: knowledge.ini.php with privileges like: select, insert, update, alter, create, delete, drop, reload, index on tables and databases with grant option go from allowed hosts; see table mysql.user or ask your DBA of the mySQL server on your used system. During installation of mySQL, you will be asked for that userid and password and it will be assumed the necessary privileges to that userid by default. On multiple user systems, it is preferable to use a separate userid for that PHP & mySQL application with own privileges which are not the complete root admin privileges. For that, use INSERT SQL statement on table mysql.user to insert a new user for using as userid in file knowledge.ini.php and GRANT SQL statement to grant permissions for the new user inserted into table mysql.user on your mySQL server.

The start pages of my Knowledge Base (that PHP & mySQL application) are knowledge.html or lookup.php. At a localhost with virtual Web path $path = "/kb" is the URL address for the Web browser ie.
            http://localhost/kb/knowledge.html   or
            http://localhost/kb/lookup.php

The needed database on mySQL server and the knowledge bases (tables) will be created at the first login. The first login should be with username: admin and a password you are typed in on logon window. Be sure that the admin password is your own. You can create new knowledge bases (tables) by inserting the knowledge base names in the FORM selection list as new options in the file "tables.html" and select the configuration option $tables=true on file "knowledge.ini.php". You can also create as user "admin" new knowledge bases (tables) by calling the page "knowledge.php", "knowledge.php" can only be called if you want to reply to an existing message from the subject ("list.php") or message ("show.php") listing and you are logged in.

If the PHP script files were loaded into the Web browser (via Web address or localhost) and a user was not logged in, a line on the response page at the top tells the user to login.

There is a language option implemented. On configuration file knowledge.ini.php there could be defined at present 2 languages of the Web page text content: $language="english" or $language="german". The selected language uses the language files from the related PHP script file names.

If you speak other languages and would translate the language files in your language you could do it, ...and if you are so nice you can send me a copy to provide these language files here to share it with others, Thanks!.

The following files will be unzipped:
   readme.html
   knowledge.ini.php
   top.html
   footnote.html
   knowledge.html
   install.html
   tables.html
   smile.gif
   back.jpg
   knowledge.english.php
   list.english.php
   show.english.php
   delete.english.php
   lookup.english.php
   search.english.php
   insert.english
   delete_kb.english.php
   create.english.php
   browse.english.php
   logon.english.php
   knowledge.german.php
   list.german.php
   show.german.php
   delete.german.php
   lookup.german.php
   search.german.php
   insert.german.php
   delete_kb.german.php
   create.german.php
   browse.german.php
   logon.german.php.php
   firstmessage.txt.php
   pwd.css
   delete_kb.php
   delete.php
   insert.php
   knowledge.php
   list.php
   logon.php
   lookup.php
   search.php
   show.php
   create.php
   install.php
   browse.inc.php
   nichts.gif
   create.gif
   create1.gif
   answer.gif
   answer1.gif
   eye.gif
   eye1.gif
   left.gif
   left1.gif
   logged.gif
   logged1.gif
   logon.gif
   logon1.gif
   lookup.gif
   lookup1.gif
   right.gif
   right1.gif
   trash.gif
   trash1.gif

The file readme.html include this instructions (could be removed from your public Web directory where you provide this tool).

The
knowledge.ini.php file includes the following configuration
options for the PHP scripts (lines with pre // are comment lines):

<?php
// name or IP-address of mySQL database server,
// userid and password for that server
$server      = "localhost";
$userid      = "mySQL_userid";
$passwd      = "mySQL_password";
$verbindung = @mysql_connect($server, $userid, $passwd) or
              die("Sorry!<br><br> no connection to mySQL" .
              " database server at host: $server.<br><br>" .
              " That could be happen:<br>" .
              " if the mySQL user: $userid" .
              " has no access to the mySQL server,<br>" .
              " or the mySQL database server is down at present,<br>" .
              " or you are using wrong userid/passwd on file knowledge.ini.php.");

// name of mySQL database
//      note: on some hosts, this name is restricted or 
//            pre-defined with value of $userid, ie. "mySQL_userid".
$db          = "know";


// tables are defined in file "tables.html" on FORM selection list
// and uses more than one knowledge bases (tables) in $db "know"
// $tables = true;   // switches this feature ON
// $tables = false;  // switches this feature OFF 
$tables      = false;

// default Knowledge Base table in $db
if (!$tables) $table       = "howto";

// language of Web page content
$language    = "english";
//$language    = "german";

// virtual Web path (alias on Web server path for that
// mySQL & PHP application) with one trailing slash (no leading slash)
// (all files from 'knowledge.zip' must be unzipped and saved into the
// subdirectory with that virtual path on your Web server or localhost)
$path        = "/kb";

// out fit parameters of Web pages
$bgcolor     = "whitesmoke";
$background  = "back.jpg";
$text        = "black";
$link        = "navy";
$alink       = "blue";
$vlink       = "mangenta";
// color of key on found search result page $searchcolor = "red"; //darkblue, navy, etc. $body = "text='$text' link='$link' alink='$alink' vlink='$vlink' bgcolor='$bgcolor' background='$path/$background'"; ?>

The red values  above in the file knowledge.ini.php are
to customize to the conditions on your Web server settings or localhost.

Create & Delete one or more Knowledge Bases

If a table does not exist, the table will be created by "login.php" or by "insert.php". In other words, if a user logs in or the logged in user selects another table and inserts a message, the table will be created. Within the file knowledge.ini.php is to set the statement $tables=true if you'll use multiple knowledge bases or, if you want to use only one knowledge base use the statement $tables=false.

New knowledge bases can be added in "tables.html" by inserting of the new names in the FORM selection list with new option:

<FORM name='tabl'><TT>
<select name='tables' size=1 onChange='selectTable(this.form.tables)'>
<!-- option values must be enclosed with 'single' quotes and should be lowercase -->
<option value=''>Please select a specific Knowledge Base &nbsp; &nbsp;
<option value='howto'> &nbsp; howto
<option value='mykb'> &nbsp; mykb
</select></TT>
</FORM>


If a knowledge base should be deleted, remove the releated option on the HTML FORM selection list in file "tables.html".

The user "admin" can also create new knowledge base tables by calling the page "knowledge.php". This page "knowledge.php" can only be called if you want to reply to an existing message from the subject or message listing. And when you are logged in as admin, that page offers you icons to create and delete knowledge base tables (the releated PHP scripts create.php and delete_kb.php update the file "tables.html"). Write access (Unix/Linux: chmod 777 or chmod 755) on the Web directory for my Knowledge Base (ie. /kb) must be present during creating or deleting a table by the user admin by this way. In the file "knowledge.ini.php" is to set the option $tables = true if you want to use multiple knowledge base tables.

If you don't want to use this feature, set the $tables = false within the configuration file "knowledge.ini.php". This is preferable.


Password Security
The password to login with username on the startpages: "knowledge.html", "knowledge.php" or "lookup.php" will be encrypted by a simple-complicated algorithm -developed by the author- for using this tool also in Windows 95/98/2000/NT which have no default subroutine, like CRYPT on UNIX platforms. The e-mail will not be used in that version.

The username and password will be used only to check the permission for the access to the knowledge bases created by this tool; this is >>not<< the mySQL username and >>not<< the password to access mySQL on your server. To read messages from the knowledge base only, no login is necessary. Message owners and the user "admin" can delete messages from the knowledge base (message listing) -if they are logged in.

Security & Privacy
For saving secret or private messages or notes, this tool is to that unsuitable.



Well, that's all for now! Hope it's a nice tool.

And if you find an error condition, please send me a note (schick@yours.com).
© Copyright by Arnold Schick       This tool is provided   "as it is"   (no warrenty).

    actual Notes      mySQL & PHP    my Knowledge Base
New version 1.1 was released with install utility and re-named language & include files. All include files have now an additional file extension .php to load also the include files from php scripts on Web servers which have not allowed the file extensions: .inc or .ini or .english or .german. It's no more possible to load the file knowledge.ini into a Web browser and find out the user-id and password from the used mySQL server.

20-July-2001



New installation script was added to install my Knowledge Base without editing the configuration file knowledge.ini.php. This script 'install.php' will be called by starting with the HTML page 'install.html' and modifies the configuration file 'knowledge.ini.php'. This new script and HTML page was inserted into the download zip archive file 'knowledge.zip'.

14-July-2001



New configuration option was added in the file knowledge.ini.php to set a own name for the table admin:
// name of administrator table in the mySQL database $db
$admin      = "know_admin";
Some users wanted another table name for the administrator table name admin (there was some trouble on systems to install this tool, where the name admin was reserved).

If you have installed my Knowledge Base before and would like to upgrade by this version, define in the file knowledge.ini.php the admin option with your used admin table name "admin":

// name of administrator table in the mySQL database $db
$admin      = "admin";
30-June-2001, 6-July-2001


If a message includes a Web link like <a href=address>link</a> and should be inserted into a knowledge base, only unquoted addresses issuing a usable link in the message listing. A quoted address link like <a href="address">link</a> will not follow the link correctly on click.

30-June-2001



There must grant permissions to a user of mySQL with the userid from the init file: knowledge.ini.php with privileges like: select, insert, update, alter, create, delete, drop, reload, index on tables and databases with grant option go from allowed hosts; see table mysql.user or ask your DBA of the mySQL server on your used system. During installation of mySQL, you will be asked for that userid and password and it will be assumed the necessary privileges to that userid by default. On multiple user systems, it is preferable to use a separate userid for that PHP & mySQL application with own privileges which are not the complete root admin privileges. For that, use INSERT & GRANT SQL statements on table mysql.user on your mySQL server to insert a new user for using as userid in file knowledge.ini.php.

23-June-2001



Differrent language versions are available at present only in English and German; other languages could follow.
 
05-May-2001



The mySQL & PHP scripts to build a Knowledge Base was offered now.

You can download all needed scripts and icons and include files as zip archive file: knowledge.zip unzip all files into your desiered Web directory and configure this application by instructions included in the README.TXT file. Install the PHP version 4 interpreter and mySQL database system, configure the Web server (aliases) and build your own Knowledge Base. This application could be also installed on a local machine to run on a localhost.
 
05-May-2001




The structure on a mySQL server is for example:
    mySQL Server (with IP-Number or Host-Name)
     |
     +--- database mysql (used by the mySQL server)
            |
            +--- table user
            +--- <additional tables, like db, host, tables_priv>


        and for the database and tables for this tool:

     +--- database know  (is defined in file knowledge.ini.php)
           |
           +--- table know_admin  (is defined in file knowledge.ini.php)
           +--- table howto  (is defined in file knowledge.ini.php)
           +--- <additional table, name used from file tables.html>
           +--- <additional table, name used from file tables.html>


     +--- <additional database with its tables>
     +--- <additional database with its tables>