kastermester / hhvm-pgsql

Postgres Extension for the HipHop PHP Virtual Machine
Other
1 stars 0 forks source link

Postgres Extension for HipHop

This is an implementation of the pgsql PHP extension for the HipHop PHP VM.

Prerequisites

This extension only requires the libpq library distributed with Postgres and HipHop VM itself.

Pre-built versions

We supply pre-built versions of this extension for Debian 7 Wheezy, Debian 8 Jessie and CentOS 6.4. These can be found here and should be renamed to pgsql.so before you follow the below installation instructions.

Building & Installation

Installation requires a copy of HipHop to be built from source on the local machine, instructions on how to do this are available on the HipHop Wiki. Once done, the following commands will build the extension.

$ cd /path/to/extension
$ $HPHP_HOME/hphp/tools/hphpize/hphpize
$ cmake .
$ make

This will produce a pgsql.so file, the dynamically-loadable extension.

To enable the extension, you need to have the following section in your hhvm config file

DynamicExtensionPath = /path/to/hhvm/extensions
DynamicExtensions {
    * = pgsql.so
}

Where /path/to/hhvm/extensions is a folder containing all HipHop extensions, and pgsql.so is in it. This will cause the extension to be loaded when the virtual machine starts up.

Differences from Zend

There are a few differences from the standard Zend implementation.

Otherwise, all functionality is (or should be) the same as the Zend implementation.

As always, bugs should be reported to the issue tracker and patches are very welcome.