Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 | 

Installing the PHP Module

Installing Required Software

You should install the software below, first:

  • Apache Web server : Version 2.0 or later
  • PHP : Version 5.2 or later
  • CUBRID
Downloading PHP Modules

Download drives from ftp://ftp.cubrid.org/CUBRID_Drivers/PHP_Driver/. For latest information on PHP drives, visit Web site (http://www.cubrid.org/php_api_for_cubrid).

Installing for Windows
  1. Store the php_cubrid.dll file under PHP extension directory (default location : C:\Program Files\PHP\ext).
  2. Configure the system configuration variable. The environment variable value of PHPRC should be C:\Program Files\PHP and  %PHPRC% and %PHPRC%ext" should be added to the value of Path environment variable.
  3. Add the following line at the end of the php.ini file (default location : C:\Program Files\PHP\php.ini).
    • [PHP_CUBRID] extension=php_cubrid.dll
  4. Once configuration is complete, restart the Web server.
Installing for Linux
  1. Store the cubrid.so file under PHP extensions directory. The file is usually located under /usr/lib/php5/20090626 in PHP 5.3.3; however, the location depends on PHP versions).
  2. Add the following line at the end of the php.ini file (default location : /etc/php5/apache2/php.ini).
    • [CUBRID] extension=cubrid.so
  3. Once configuration is complete, restart the Web server.
Installing Package
Using the Installation Wizard for Windows

You can download CUBRID PHP API Installer from http://www.cubrid.org/php_install_wizard.

Installing by Using PEAR Package for Ubuntu Linux

First, you must set up phpize and PEAR package. Follow the steps below.

  1. Install Apache Web server and PHP. For information on installation of Apache Web server and PHP, visit the Web site (http://www.cubrid.org/cubrid_apache_php_ubuntu).
  2. Execute the following line to set up phpize.
    1. sudo apt-get install php5-dev
  3. Execute the following line to install PEAR package.
    1. sudo apt-get install php-pear
  4. Execute the pecl command in PEAR package so that the latest CUBRID PHP extension can be installed.
    • sudo pecl install cubrid
    • To install the earlier version of PHP drivers, you must specify the desired version.
    1. sudo pecl install cubrid-8.3.0.0005
  5. Add the following line at the end of the php.ini file (default location : /etc/php5/apache2/php.ini).
    1. [CUBRID] extension=cubrid.so
  6. Once configuration is complete, restart the Web server.
Installing by Using PEAR Package for Linux Except for Version Ubuntu

First, you must install phpize and PEAR package. Follow the steps below.

  1. Set up phpzie. The version php-dev must be PHP 5.2.x or PHP 5.3.x. If you are using the earlier version of PHP, update PHP before proceeding with installation.
    1. yum install php-devel
  2. Download PEAR package.
    1. wget http://pear.php.net/go-pear.phar
  3. Install PEAR package.
    1. php go-pear.phar
  4. Install the latest verions of CUBRID-PHP Extension.
    1. pecl install cubrid
    • To install the earlier version of PHP drivers, you must specify the desired version.
    • sudo pecl install cubrid-8.3.0.0005
  5. Add the following line at the end of the php.ini file (default location : /etc/php5/apache2/php.ini).
    1. [CUBRID] extension=cubrid.so
  6. Once configuration is complete, restart the Web server.

    Note If you use the phpinfo() function to create test.php and verify that CUBRID configuration page is properly displayed after entering http://<IP address in which Web server is installed>/test.php, it means installation is successfully done.