Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Installing CUBRID PHP Driver using PECL


If PECL packager is installed in your system, the installation of CUBRID PHP Driver is straightforward. PECL will download and compile the library for you.

Requirements

To install the PHP Driver using PECL, you need to have CUBRID Database installed in your system since PHP Driver is dependent on CUBRID CCI API.

Installation

Type the following command to install the latest version of CUBRID PHP Driver.

sudo pecl install cubrid

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

sudo pecl install cubrid-8.3.0.0005

During the installation you will be prompted to enter "CUBRID base install dir [autodetect] :". Just to make sure your installation goes smoothly, enter the full path to the directory where you have installed CUBRID. Ex: if CUBRID was installed at /home/cubridtest/CUBRID, then enter /home/cubridtest/CUBRID.

a) If you have Centos 6.0 and above or Fedora 15 and above, then do not edit the php.ini as stated in step b and instead create a file named cubrid.ini in which you add only the line extension=cubrid.so. This file has to be placed in the /etc/php.d folder.

b) Edit the php.ini (default location: /etc/php5/apache2/php.ini or /etc/php.ini) and add the following two lines at the end of the file.

[CUBRID] extension=cubrid.so

To apply the changes, restart your Web Server.

What If I don't have PECL installed?

If you do not have PECL installed, follow these instructions to get it installed in your system.

Ubuntu Instructions

In order to install CUBRID-PHP API on Ubuntu, you will need PHP Development Tools (phpize) and pear packager.

  • Type the following command to install phpize
    sudo apt-get install php5-dev
  • Type the following command to install pear package
    sudo apt-get install php-pear

Then follow the above instructions to install CUBRID PHP Driver.

Fedora/CentOS Instructions

In order to install CUBRID-PHP API on Fedora/CentOS, you will need PHP PEAR and phpize packages.

  • Install phpize. Remember that php-dev should be either PHP 5.2.x compatible or PHP 5.3.x since CUBRID-PHP Extension is developed for these PHP versions. If your Linux distribution installs earlier version, you need to update it. 
    yum install php-devel
  • Download PEAR package
    wget http://pear.php.net/go-pear.phar
  • Run PEAR package with PHP: 
    php go-pear.phar

What's Next?

  • Refer to CUBRID PHP Tutorials
comments powered by Disqus
Page info
viewed 4619 times
translations en
Author
posted 3 years ago by
CUBRID
Contributors
updated last year by
View revisions
Share this article