= System requirements =
 * PHP5 with sockets support compiled and enabled;
 * MonetDB5 / Merovingian using mapi protocol version >= 8.

= Enable socket support in PHP =

In order to get the native monetdb PHP implementation to work you need
a PHP5 interpreter with socket support compiled and enabled.

You can verify wether your interpreter has sockets support compiled by running the command:

$ php-config --configure-options

and check for the presence of the "--enable-sockets" option.

In order to enable sockets support in your php interpreter; 
load the php_sockets.so library from the php.ini configuration file.


;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;

extension=php_sockets.so


= Set a timezone =
In order to avoid unexpected behaviours with the library it is advised to set a
timezone for the PHP interpreter

This can be done by enabling the setting "date.timezone" in the php.ini configuration file.

[Date]
; Defines the default timezone used by the date functions
date.timezone = Europe/Amsterdam

For a list of supported timezone see: http://php.net/manual/en/timezones.php

= Use the library =
The library is shipped as a series of include files and does not come as a binary object (.so).

In order to use it in your applications include the "lib/php_monetdb.php" file
in all pages that want to make use of a database connection. Note that this file requires php_mapi.inc
to be present in the same directory.

If you installed MonetDB (either by building from sources or using binary packages) the native PHP interface
will be located in "/usr/share/php/monetdb"

On most system you should be able to use the library by including or requiring "monedtdb/php_monetdb.php".

In case the system is not able to find the library it is possible to specify the include path in php.ini

; UNIX: "/path1:/path2"
include_path = ".:/usr/share/php/monetdb"

Please note that the library is not installed by the Windows installer. When building from source on this platform the includes will be installed under the given prefix.


