Entering content frame

Procedure documentation Testing the PHP Library (Microsoft Windows) Locate the document in the library structure

Use

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.

Prerequisites

·        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.

Procedure

...

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

Variable

Description

maxdb.default_db

Name of database instance

maxdb.default_user

Name of a valid database user

maxdb.default_pw

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>

Example

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:

[maxdb]

maxdb.default_db=DEMODB

maxdb.default_user=MONA

maxdb.default_pw=RED

       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

Note

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.

 

Leaving content frame