Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register


Configuring the Environment

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

Compile PHP Library with PHP source code

1. Extract PHP source code, and create directory cubrid under dir ext:

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

2. Go to the root directory of PHP source code and update the configuration file:

php-root> phpize

3. Configure the project. Before you run configure, we strongly recommend that you run "./configure –h" to check the configure options.
An example may be like this (we assume that apache2 has been installed in /usr/local):

php-root>./configure --prefix=/usr/local/php -with-cubrid=shared --enable-maintainer-zts --with-apxs2=/usr/local/apache2/bin/apxs


Include CUBRID support 


Enable thread safety - for code maintainers only 


Build shared Apache 2.0 Handler module.
File is the optional pathname to the Apache apxs tool apxs

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

php-root> make; make install

5. Copy php.ini-xxx (In PHP 5.2.x, they are php.ini-dist and php.ini-recommended; In PHP 5.3.x, they are php.ini-development and php.ini-production; choose what you need) file to directory /usr/local/php/lib, and rename it to php.ini.

php-root> cp php.ini- production /usr/local/php/lib/php.ini

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/extension/no-debug-zts-xxx"
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.





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