Installing the Max DB PHP Library (Microsoft Windows)

Use

You install the MaxDB-PHP library php_maxdb.dll. in Microsoft Windows in order to be able to use the MaxDB PHP extension.

To do this you, use the corresponding file for the version of your PHP installation: php_maxdb.dll.

Prerequisites

·        You must have installed the programs tar and gzip for Microsoft Windows.

·        You must have downloaded the PHP binary distribution for Microsoft Windows. You can find this under php.net/downloads.php

·        You must have downloaded the appropriate MaxDB PHP library for your PHP version.

You can find the package for PHP5 under snaps.php.net/win32/PECL_5_0/php_maxdb.dll

You can find the package for PHP4 under snaps.php.net/win32/PECL_STABLE/php_maxdb.dll

·        You must have installed the MaxDB SQLDBC software at least (Base and SQLDBC software components). The installation path in the following is <independent_program_path>.

To be able to reproduce the test examples described in the following, you also require a database instance however. For this reason we recommend that you install the complete MaxDB software first, create a database instance, then load the tutorial data to this database instance. Using the Installation Manager is a very easy and secure way of doing this.

Procedure

...

       1.      Unpack the PHP binary distribution to a local directory <php_binary> on your computer.

       2.      Select the appropriate MaxDB PHP library for your PHP version and unpack this to the directory containing the extensions for the PHP binary distribution:

For PHP5, unpack the package to <php_binary>\ext

For PHP4, unpack the package to <php_binary>\extensions

       3.      Copy the file php.ini-recommended from the <php_binary> directory to the directory of your version of Microsoft Windows <win_dir> and rename it php.ini:

copy <php_binary>\php.ini-recommended <win_dir>\php.ini

       4.      Open the php.ini file in an editor and add the following line to the Dynamic Extensions section:

extension=php_maxdb.dll

       5.      Look for extension_dir in the php.ini file and enter the directory containing the extensions for the PHP binary distribution of your PHP version.

For PHP5, enter:

extension_dir=?<php_binary>\ext?

For PHP4, enter:

extension_dir=?<php_binary>\extensions?

       6.      Save your changes and close the php.ini. file.

       7.      Enter the necessary paths to the PATH environment variable:

SET PATH=%PATH%;<php_binary>;<php_binary>\ext

Result

The MaxDB PHP library has been installed.

You can display the list of all PHP extensions installed as a test to check the installation has been successful. To do so, enter the following command:

php –m

If no errors have occurred, the PHP extension maxdb is displayed in the list.

For other tests, see: Testing the PHP Library (Microsoft Windows).

Example

You are using PHP5 and want to install the MaxDB PHP extension for Microsoft Windows (32 bit).

You are using the Windows XP operating system and this is installed in the C:\WINDOWS directory.

...

       1.      Unpack PHP 5.0.0 to the directory C:\php-5.0.0-Win32

       2.      Unpack the package http://snaps.php.net/win32/PECL_5_0/php_maxdb.dll to C:\php-5.0.0-Win32\ext.

       3.      Copy the file php.ini-recommended from the file C:\php-5.0.0-Win32 to the directory C:\WINDOWS and change its name to php.ini:

copy C:\php-5.0.0-Win32\php.ini-recommended C:\WINDOWS\php.ini

       4.      Open the php.ini file in an editor and add the following line to the Dynamic Extensions section:

extension=php_maxdb.dll

       5.      In the php.ini file, look for extension_dir and enter the directory  C:\php-5.0.0-Win32\ext there.

extension_dir=?c:\php-5.0.0-Win32\ext?

       6.      Save your changes and close the php.ini. file.

       7.      Enter the necessary paths to the PATH environment variable:

SET PATH=%PATH%;C:\php-5.0.0-Win32;C:\php-5.0.0-Win32\ext