How to install PEAR MDB2:

Local Installation

If you are running PHP locally, PEAR should automatically be bundled with PHP. All that should need to do is to open up a command prompt and enter the following commands:

pear install MDB2-2.4.1

—followed by either—

pear install MDB2_Driver_mysql-1.4.1


pear install MDB2_Driver_mssql-1.2.1

—depending on your database type.


You can also visit the following links to install it manually:


Webhost Installation

If you are using a webhost, then there are probably several different ways to install PEAR MDB2, but the easiest way would be through the use of a PEAR configuration manager supplied by your webhost. Here’s an example of how it is done in bluehost (

Login to your control panel, and click the “PHP PEAR Packages” icon.


Within the manager, go to the “Install a PHP Extensions and Applications Package” text field and type “MDB2”, and then click “Install Now” (1). This should direct to a new screen while it installs MDB2. When you get back to the manager, MDB2 should show up under the “Installed PHP Extension(s) and Application(s)” table (2).

Now, repeat the above steps to install the driver for your database – you must type either “MDB2_Driver_mysql” or “MDB2_Driver_mssql” in the installation text field depending on which database type you are running (if you’re using a webhost, you’re more than likely using mysql).

Finally, copy the path given for your extensions so you can add it to your include_path in the next step (3).



Adding MDB2 to your include_path:

If your include_path doesn’t include the directory where MDB2 is installed, then Archon will not work. In this example, our MDB2 files are installed in the path “/home3/chrispro/php” per the webhost installation example. There are two ways to include your MDB2 installation:

  1. Append the directory to the include_path in your php.ini file (some webhosts allow you to have your own custom php.ini). Paths are delimited by a colon ( : ).

include_path = ".:/usr/lib/php:/usr/local/lib/php:/home3/chrispro/php";

  1. In the file in the root directory or Archon, add the following line at the top of the file (after the comments, but before any code).

ini_set('include_path', '/home3/chrispro/php:' . get_include_path());