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.
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.
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 pdo_cubrid.ini in which you add only the line extension=pdo_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.
If you do not have PECL installed, follow these instructions to get it installed in your system.
In order to install CUBRID-PHP API on Ubuntu, you will need PHP Development Tools (phpize) and pear packager.
sudo apt-get install php5-dev
sudo apt-get install php-pear
Then follow the above instructions to install CUBRID PHP Driver.
In order to install CUBRID-PHP API on Fedora/CentOS, you will need PHP PEAR and phpize packages.
yum install php-devel
wget http://pear.php.net/go-pear.phar
php go-pear.phar
You can check correct installation by using $>php -r "echo phpinfo()" and getting the following results. That warning means that you have to set in php.ini the date.timezone parameter
....
CUBRID
CUBRID support => enabled
Client API version => 8.4.1.0001PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EET/2.0/no DST' instead in Command line code on line 1
Supported CUBRID server => 8.4.0
The correct way to install the driver on RHEL like distros (Fedora, RHEL, CentOS) is to add a new file in /etc/php.d/cubrid.ini with a single line extension=cubrid.so and NOT edit the php.ini
There are several ways to install CUBRID PHP Driver. Below you will see instructions for each of them. [Installing CUBRID PHP Driver using PECL] (Linux) [Inst...
3 months ago
There are several ways to install CUBRID PHP Driver. Below you will see instructions for each of them. [Installing CUBRID PHP Driver using PECL] (Linux) [Inst...
3 months ago
For 8.4.1 on CentOS 6, if you are getting