In this tutorial you will learn how to install CUBRID PHP driver on Mac OS X through PECL repository using CUBRID CCI driver.
CUBRID PHP driver has a dynamic dependency on CCI driver. We have built a custom CCI driver for Mac users. You can download either 64 or 32 bit version. Once you download it, you need to copy the contents of the /lib directory /usr/lib and the contents of /include directory into /usr/include. The following example illustrates how to extract a 64-bit version.
tar zxvf CUBRID-CCI-8.4.1.4009-x64.macosx.tar.gz sudo cp CUBRID-CCI-8.4.1.4009-x64/lib/* /usr/lib sudo cp CUBRID-CCI-8.4.1.4009-x64/include/* /usr/include
Type the following command to install the latest version of CUBRID PHP Driver from PECL repository.
sudo pecl install cubrid
If you need older version of the driver, you can indicate its exact version like:
sudo pecl install cubrid-8.4.1.0003
During the installation you will be prompted to enter "CUBRID base install dir [autodetect]:". Enter that same directory where we have extracted CUBRID CCI driver files.
CUBRID base install dir [autodetect] : /usr
Now find the php.ini file and add the following line which instructs your Web server or FastCGI Process Manager to load CUBRID extension with the next restart.
extension=cubrid.so
Done! Now restart your Web server to load CUBRID extension.
Create a simple test.php file with the following contents:
<?php phpinfo(); ?>
In your browser visit http://localhost/test.php. Search for "CUBRID". You should see entries like Version, CCI Version, and CUBRID Version.
If you have any questions, please ask them at our Q&A site. If any issues with installation, post on our forum.