Firefox 3

Setting up script

Before doing any work with the database itself, you should make a general plan where the data files will be located, how they will be secured etc. To accomplish this, you may have to edit your ptb_ini.php file. Remember, it has to be placed in the same directory as main script, i.e. pjjtextbase.php.

Meaning of individual entries in ptb_ini.php is explained in detail here.

To make your website maintenance efficient, I suggest that you put all your data files in one directory, eg. /data:

  define('PTB_PATH_DB', '/data');

Do you want names of your files to have a prefix? If you keep them together in one directory and no other types of files are there (which is recommended), probably not:

  define('PTB_FILE_DB_PREFIX', '');

If you use Unicode (UTF-8, to be exact), should your files contain BOM (=Byte Order Mark, three characters long kind of Unicode signature that may be present at the very beginning of a file)? Remember, you can have all your files coded with UTF-8 BOM–or none. Default value is false, since UTF-8 files don't really require it:

  define('PTB_BOM', false);

Do you need to secure your data? If you want to allow comments AND will write e-mail addresses of their authors, let's take care that nobody can steal them:

  define('PTB_DEFAULT_SECURITY', '1');
  define('PTB_SEC_STR', "<?php die('Access denied!');?>");

Should error messages be displayed? This is highly advisable during development phase (but surely not in production environment, so don't forget to change it in ptb_ini.php you'll upload):

  define('PTB_SHOW_ERRORS', true);

From version 1.2 on you don't need to put into ptb_ini.php file values that are identical to default ones, thus in this case your ptb_ini.php could look like this:

  define('PTB_PATH_DB', '/data');

Now you're ready to take care about the database.