The following procedures in this section are used to compile the c-tree PHP native driver:
Requirement:
Step 1: Create Configuration Script
Move to the drivers/php.sql/src directory under your FairCom product installation directory.
Run the phpize command to create the configuration script based on the contents of the "config.m4" file:
phpize
Step 2: Configure and Build
Run the configure script to create the makefile containing the instructions to build the FairCom DB PHP extension with the original PHP driver:
./configure
In the text that is printed, you should see the following line:
checking whether to enable c-tree SQL support... yes, shared
Build FairCom DB PHP extension using make. Note that if you change versions of PHP, you should do a make clean first, before doing make:
make
It should say “Build complete” when done. The extension will be created in the modules folder: drivers/php.sql/src/modules/ctsql.so
Step 3: Install the Extension
Install the FairCom DB PHP extension into your PHP installation extensions directory by running the following command:
sudo make install
If the folder extension was successfully installed, you should see the following:
Installing shared extensions: /usr/lib/php5/20121212/
Be sure the ctsql.so file has the same permissions as the other .so files in the install folder.
Note: Make sure php.ini is configured to load extensions from the PHP installation extensions directory. This is described in the “Configure PHP 5” section (above).
Note: If you have a configure script with installed Autotools, follow these steps:
> libtoolize
> aclocal
> autoreconf -i
> phpize
> ./configure --with-ctsql