PHP (= Hypertext Preprocessor) is an HTML-embedded server-side scripting language.

PHP is distributed at no charge for commercial or non-commercial use. For more information read the LICENSE information.

More information about PHP can be found at:

PHP manuals can be found at:

The latest PHP version can be downloaded from:

Install PEAR MDB2 on an Apache 2 webserver

Hosting providers do not allow you full access over the Apache configuration. Usually you are only allowed to modify the .htaccess file. Furthermore you can not install any software. This tutorial describes how to install the PEAR MDB2 packages manually, how to modify the .htaccess file and how to use the MDB2 package. The Apache 2 weberver is installed on Windows XP.

More information about PEAR can be found at:

Operating system used
Windows XP Home Edition Version 5.1 SP 2

Software prerequisites
Apache 2.0 or higher
MySQL 3.23 or higher

  1. Download the following PEAR packages:
    • PEAR (PEAR-1.4.11.tgz)
    • MDB2 (MDB2-2.2.1.tgz) : database abstraction layer
    • MDB2_Driver_mysql (MDB2_Driver_mysql-1.2.1.tgz) : mysql MDB2 driver

  2. Create a directory outside the docroot, for example: C:\mobilefish_web_lib

  3. Copy the files to C:\mobilefish_web_lib:
    • Unpack PEAR-1.4.11.tgz into directory c:\temp1
    • cd c:\temp1\PEAR-1.4.11
    • xcopy /S * C:\mobilefish_web_lib

  4. Copy the files to C:\mobilefish_web_lib:
    • Unpack MDB2-2.2.1.tgz into directory c:\temp2
    • cd c:\temp2\MDB2-2.2.1
    • xcopy /S * C:\mobilefish_web_lib

  5. Copy the files to C:\mobilefish_web_lib:
    • Unpack MDB2_Driver_mysql-1.2.1.tgz into directory c:\temp3
    • cd c:\temp3\MDB2_Driver_mysql-1.2.1
    • xcopy /S * C:\mobilefish_web_lib

  6. Add the following line in the .htaccess file located in the docroot.
    php_value include_path c:/mobilefish_web_lib;.

    Note 1: Use the forward slash c:/
    Note 2: If you add more paths separate with a semicolon <path>;<path>

  7. Create database "mobilefishdb" and table "address".
    See quick guide: Create database and tables.

  8. Restart Apache.