Documentation

phpMyGB

  1. Overview

   phpMyGB is a free guest book for your site written in PHP. Since phpMyGB is released under the GNU Public License, you are free to modify and distribute it according to the terms and conditions described in gpl.txt that was included in this package. 

   Your visitors can leave comments and contact information via a simple HTML form. All data is stored in MySQL. By default, 10 records are displayed per page. Navigation controls allow your visitors to go forward and backward through the "pages". 

The appearance of the guest book is controlled by a single theme file. If you want to use another theme, simple specify a different theme file in the config file. Later versions of phpMyGB will include several themes. Users are encouraged to create new themes and submit them to the author so that they may be included in future releases.

  1. Requirements

phpMyGB requires that you have the following installed on your server:

  1. Installation

Unpacking the tarball:

  1. Copy the source tarball to your web server's document root. Example: cp foo.tar.gz /usr/local/apache/www
  2. Unpack the archive. Example tar -zvxf foo.tar.gz

Point your browser to the install script.

  1. Most users will use http://yoursite/guestbook/setup/

Follow the instructions in the install script. Pay very close attention to the config file preview on the second page. You can click the back button on your browser as many times as you like to make changes before committing with the "finish" button. There are only a few things that can make the installation fail. The error messages should provide enough information to troubleshoot any problems you may have. If all else fails you can get help from the author and other users on the message board.

  1. Setup form field descriptions.

Section 1: Dir Names

Your site URL: This is the URL for your site.

Example: http://www.mysite.com/
Important! Please include the trailing slash in your URL!

Installation Directory: This is the directory your guestbook program resides in relative to your HTML document root. By default the directory name is "guestbook".

Scenario 1: Your guest book is in your HTML document root. You would type "guestbook" in the form field. (Without the quotes)

Scenario 2: Your guest book is in a directory called php_scripts  in your HTML document root. You would type "php_scripts/guestbook". (Without the quotes)

Local path to guest book: This is the path to the guestbook directory. 

Example 1: /home/httpd/html

Example 2: /usr/local/apache/html

Icon Directory: The default is "icons". Unless you are modifying phpMyGB you will not need to change this.

Section 2: MySQL 

Hostname: Enter the hostname of your MySQL server. 

Scenario 1: MySQL is installed on the same machine as Apache. Enter "localhost". (Without the quotes)

Scenario 2: MySQL is located on a separate machine than the web server. The machine's name is "enterprise".
Enter "enterprise". (Without the quotes) 

User: A MySQL user that is allowed to SELECT, INSERT, and CREATE on your guestbook database. 

You should have already created this users and set the permissions. I suggest you avoid the temptation to use your MySQL "root" account. Sure, it will work, but phpMyGB doesn't need "god" privileges over MySQL to operate. If I get a lot of feedback that this is confusing, I'll change the install script to make it even easier.

Password: Enter the MySQL password of the user described above. 

Each time phpMyGB opens a connection to the MySQL server it must be authenticated. You will see nasty errors without a valid username/password pair.

Database Name: Enter the name of the database you want the script to create.

Table Name: Enter the name of the table you want setup to create in the database described above. 

This table will hold all of your guestbook data.

Section 3: Icons

Unless you have a different set of icons than the ones distributed with phpMyGB there is no need to change anything in this section.

 

Section 4: Appearance

Caption: The string visible in your browser's status bar when you move your mouse over the link to sign the guestbook.

Theme: The theme file that will control the appearance of your guest book.

Currently, phpMyGB is only distributed with one theme file. It is safe to leave this field at the default.