Testing the PHP Library (Microsoft Windows)


You test the functions of the MaxDB PHP extension. You can either use the test scenario included in the MaxDB PHP package for this or develop your own tests.


·        You must have installed the MaxDB PHP library.

See: Installing the MaxDB PHP Library (Microsoft Windows)

·        You need to install the MaxDB software and create a database instance. This is located on the same computer as the PHP installation. If you want to use the MaxDB test scenario provided, you need to have loaded the tutorial data into the database instance.

See: Using the Installation Manager

·        If you want to use the MaxDB test scenario provided, you also need to download the MaxDB source package under pecl.php.net/package/maxdb and unpack this into the <maxdb_php> directory. The test programs are contained in this package.



       1.      Open the php.ini file in the directory of your version of Windows and enter [maxdb] plus values for the following variables:




Name of database instance


Name of a valid database user


Password of the database user

       2.      Go to the directory <test_program_folder> containing the test programs:

cd <test_program_folder>

       3.      Run the individual test programs. Enter the following command to execute the <test program>:

php <test_program>


You have unpacked the PHP binary distribution to the directory C:\php-5.0.0-Win32.

You have installed the MaxDB PHP library for Microsoft Windows in the C:\WINDOWS directory.

You have unpacked the MaxDB source package to the directory C:\php-5.0.0-Win32\ext\maxdb\tests.

You have installed the MaxDB software and created the DEMODBdatabase instance as well as the database user MONA with the password RED.

You use the MaxDB test scenario provided.

       4.      Open the file C:\WINDOWS\php.ini in an editor program then insert the following:





       5.      Go to the directory containing the MaxDB PHP test programs.

cd C:\php-5.0.0-Win32\ext\maxdb\tests

       6.      Execute the maxdb001.php test program.

php maxdb001.php

The PHP binary distribution for Microsoft Windows does not include a test frame. You therefore need to execute each test program for the MaxDB PHP library individually.