Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register


Configuring the Environment

  • cubrid 2008 R4.3:
    Install CUBRID 2008 R4.3, and make sure the Environment Variable %CUBRID% is defined in your system;
  • PHP 5.3/5.4 source code:
    Download PHP source code (PHP 5.3 or 5.4) from When we update this build guide, the latest stable version of PHP 5.3 is 5.3.21, and PHP 5.2 is 5.4.11.
  • Apache2:
    We can use apache2 to test PHP;

Compile PHP Library for CUBRID individually

1. Download PHP Library(, extract it and enter the directory. Take CUBRID-PHP5- for example.

$> tar zxvf CUBRID-PHP5-;
$> cd RB-8.4.3

2. Run phpize

cubrid-php> /usr/bin/phpize

What is phpize? Where can I get it?

phpize is a shell script to prepare PHP extension for compiling. Typically, when you install PHP, phpize will be automatically installed. If it is not installed on your system, the process of get it is as follows:

1. Download PHP source code, and make sure its version is what you want your PHP extenstion works with. Extract PHP source code, and enter its root directory:

$> tar zxvf php-<version>.tar.gz (or tar jxvf php-<version>.tar.bz2)
$> cd php-<version>

2. Configure the project, and build and install it. You can specify the directory you want install PHP to with configure option --prefix:

php-root> ./configure --prefix=prefix_dir; make; make install

3. Then you can find phpize in prefix_dir/bin.

3. Configure the project. Before you run configure, you'd better run "./configure –h" to see the configure options. For example:

cubrid-php> ./configure --with-cubrid --with-php-config=/usr/local/bin/php-config

4. Build. If it was successfully compiled, the file will be created in the ./modules directory:

cubrid-php> make

5. Copy to the extensions directory in lib/php directory which is located inside PHP root directory (/usr/local/php):

cubrid-php> mkdir /usr/local/php/lib/php/extensions 
cubrid-php> cp modules/ /usr/local/php/lib/php/extensions

6. In php.ini file set the extension_dir variable and add CUBRID PHP Library to extension variable. For example:

extension_dir = "/usr/local/php/lib/php/extensions"
extension =

Test CUBRID PHP Library Installation

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

<?php phpinfo(); ?>

2. Use web browser to visit http://localhost/test.php, and if you see the following contents, the installation is successful.

CUBRID support


Driver Version

CCI Version


comments powered by Disqus
Page info
viewed 1997 times
translations en
posted 6 years ago by
updated 4 years ago by
View revisions
Share this article