Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Build CUBRID PDO Driver on Mac OS X through PECL using CCI Driver


In this tutorial you will learn how to install CUBRID PDO driver on Mac OS X through PECL repository using CUBRID CCI driver.

Download CCI driver

CUBRID PDO driver has a dynamic dependency on CCI driver. You can download either 64 or 32 bit version of CUBRID CCI diver depending on your Mac OS architecture. Once you download it, you need to copy the contents of the /lib directory to /usr/lib and the contents of /include directory to /usr/include. The following example illustrates how to extract a 64-bit version and copy its contents.

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

Install PDO driver using PECL

Type the following command to install the latest version of CUBRID PDO Driver from PECL repository.

sudo pecl install pdo_cubrid

If you need older version of the driver, you can indicate its exact version like:

sudo pecl install pdo_cubrid-8.4.3.0001

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

Configure php.ini

Now find the php.ini file and add the following line which instructs your Web server or FastCGI Process Manager to load CUBRID PDO extension with the next restart.

extension=pdo_cubrid.so

Done! Now restart your Web server to load CUBRID extension.

Test CUBRID PHP API

Create a simple test.php file with the following contents:

<?php phpinfo(); ?>

In your browser visit http://localhost/test.php. Search for "pdo_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.

comments powered by Disqus
Page info
viewed 1850 times
translations en
Author
posted last year by
CUBRID
Contributors
updated last year by
View revisions
Share this article