PHP

Top  Previous  Next

The PHP extension makes it possible to access RW NetServer 3 from PHP scripts which for example are very popular for web applications and similar setups.

 

PHP version 4.2.x and up is supported and a pre-compiled version for Windows is included. The pre-compiled versions are known to work with at least PHP 4.3.11, 4.4.0 and 5.2.1. For version 5.2.15+ you need the thread-safe version. Version 5.3.x is not supported at the moment.

 

Installing the extension on windows

 

Copy the php4_kbmmw.dll file to your php/extensions folder and add an entry in the php.ini file (in windows folder):

 

[PHP]

extension=php4_kbmmw.dll

 

Make sure you have msvcr71.dll in your system32 folder. If it is missing, copy it from the same folder as php4_kbmmw.dll resides in.

 

Use php5_kbmmw.dll for PHP 5.

Use php7_kbmmw.dll for PHP 7.

 

Building the PHP extension

 

On Linux the extension is compiled into the executable, while it is a seperate dll on windows.

 

Make sure that you have the following installed:

 

Full PHP development package for PHP v.4.2.x or newer.

Full C development SDK matching your system (GCC primarly supported by PHP).

libtool v. 1.4.x (not 1.5.x as that wont work with the standard PHP building procedures. Please notice that PHP automatically generates a local symbolic link to /usr/local/bin/libtool which is placed in PHP's root directory.)

automake v. 1.5

Autoconf v. 2.13 (earlier versions have problems with cleaning up its cache properly. To circumvent, delete the contents of the autom4te.cache directory before doing buildconf.)

kbmMW pure C-client. The include files must be placed in /usr/include/kbmmw and the library file libkbmMWClient.a must be placed in /usr/lib/kbmmw

kbmMW PHP extension. This must be placed in a directory named kbmmw in the PHP subdirectory ext

 

When these prerequisites are in place, configuration of PHP with kbmMW can begin. Usually it is required to be root to succeed with the PHP configuration.

 

First optionally clean the files from the autom4te.cache directory in the PHP install directory.

 

./buildconf --force

Will generate the configuration scripts needed by the build process.

 

./configure --enable-kbmmw

Will generate the compile scripts needed to compile PHP with kbmMW extension support. More extensions can be given on the command line.

 

make

Will compile PHP and the required extensions (in our case including the kbmMW extension).

 

Sample

 

See the PHP/sample folder for an example of a PHP client.

 

More documentation

 

Find more documentation at:

http://www.components4programmers.com/downloads/kbmmw/documentation/kbmMW_PHP_client.pdf