Product Documentation

FairCom SQL for PHP

Previous Topic

Next Topic

Compile the PHP PDO Extension (Linux/Unix)

Requirements:

  • PHP 7 development package. This contains the files needed to built PHP extensions.
    To install on CentOS, use: yum install php-devel
    To install on Ubuntu, use: apt-get install php7-dev
  • Perl
  • Autoconf
  • Automake
  • GNU m4
  • C++ Compiler

Step 1: Create Configuration Script

Move to the drivers/php.sql.pdo/src directory under your FairCom product's installation directory.

Run the phpize command to create the configuration script:

phpize

Step 2: Configure and Build

Run the configure script to create the makefile containing the instructions to build the FairCom DB PHP extension:

./configure

Somewhere in the text that is printed, you should see the following line:

checking whether to enable PDO c-tree SQL support... yes, shared

Build FairCom DB PHP PDO 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.pdo/src/modules/pdo_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

Be sure the pdo.ctsql.so file has the same permissions as the other .so files in that install folder.

Note: Be sure php.ini is configured to load extensions from the PHP installation extensions directory.

Note: If you have a configure script with installed Autotools, follow these steps:

> libtoolize
> aclocal
> autoreconf -i
> phpize
> ./configure --with-pdo-ctsql

TOCIndex