Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Stuck installing Cubrid on FC15

CUBRID Official Forum » Installation » Stuck installing Cubrid on FC15

author
message
[Level:0]gabordemooij

Post subject: Stuck installing Cubrid on FC15

registered: 02/28/2012

IP: *.151.83.165

views: 10

Hi there,

Want to try Cubrid but.. I cant get the PDO driver to work:

When I run php-cli I get:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_cubrid.so' - /usr/lib64/php/modules/pdo_cubrid.so: undefined symbol: php_pdo_register_driver in Unknown on line 0

I have no clue what this means. I installed the PDO version as described and put the extension .so ref in my php.d/cubrid.ini file.

Any ideas?

Quote
[Level:0]catalinc

# Post subject:Re: Stuck installing Cubrid on FC15

profile

registered: 06/06/2011

IP: *.181.249.254

It seems there is a version mismatch between the CUBRID PDO driver and CUBRID version you are using. The CUBRID PDO driver depends on another library that comes with CUBRID. If there are incompatible versions (as it seems in your case) it will not work.

Can you please let us know where you downloaded CUBRID from (exact link pls)(need the exact version) and also where you downloaded CUBRID PDO driver? 

Quote
[Level:8]CUBRID

# Post subject:Re: Stuck installing Cubrid on FC15

profile

registered: 03/28/2010

IP: *.181.249.254

We have looked into the error and found out that the file must be named exactly as the so file:

/etc/php.d/php_cubrid.ini instead of /etc/php.d/cubrid.ini.

So, just run:

 mv /etc/php.d/cubrid.ini /etc/php.d/pdo_cubrid.ini

If you still encounter any problems please tell us the commands you ran to install pdo_cubrid. We will make this correction in our tutorials. Thank you for informing us about your problem!

Best regards,

The CUBRID Team

Quote
[Level:0]gabordemooij

# Post subject:Re: Stuck installing Cubrid on FC15

profile

registered: 02/28/2012

IP: *.151.83.165

Thanks for the help so far. The .so file now gets recognized.

I installed CUBRID PDO using:

pecl install pdo_cubrid

but I had to install all dependencies manually using yum, also I could not install the cubrid-devel package because yum noted that some public keys were missing and I could not find these keys on your site.

However I am stuck with yet another issue.  For some reason PDO can't connect to CUBRID and I have no idea why.

I started the CUBRID server like this (I created testdb successfully):

$ /etc/profile.d/cubrid.sh 
$ cubrid service start
@ cubrid master start
++ cubrid master start: success
@ cubrid broker start
++ cubrid broker start: success
@ cubrid manager server start
++ cubrid manager server start: success
$ cubrid server start testdb
@ cubrid server start: testdb

This may take a long time depending on the amount of recovery works to do.

CUBRID 2008 R4.0

++ cubrid server start: success
$ cubrid server status
@ cubrid server status
 Server testdb (rel 8.4, pid 1788)

Once again I hope you have any ideas on how to solve this issue? I really hope to get to know CUBRID better because I want to make a RedBeanPHP driver for CUBRID.

I get the following error:

#0 /home/gabor/cubtest.php(3): PDO->__construct('cubrid:host=loc...')
#1 {main}
  thrown in /home/gabor/cubtest.php on line 3

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [-16] CCI, Cannot connect to CUBRID CAS' in /home/gabor/cubtest.php on line 3

PDOException: SQLSTATE[HY000] [-16] CCI, Cannot connect to CUBRID CAS in /home/gabor/cubtest.php on line 3

My code: (cubtest.php, starting it with php cubtest.php)

$p = new PDO('cubrid:host=localhost;port=33000;dbname=testdb'); //also tried port 30000
exit;

Thanks in advance.

Quote
[Level:8]CUBRID

# Post subject:Re: Stuck installing Cubrid on FC15

profile

registered: 03/28/2010

IP: *.91.139.84

We have tested the code you used and we encountered the same error. The problem is caused by the lack of username and password. Try to indicate also the username and the password in the connection string like:

$p = new PDO('cubrid:host=localhost;port=33000;dbname=testdb', 'dba', '');

If it still doesn't solve the problem, let me know. I'll wait for your reply.

For more examples, check out:

http://www.cubrid.org/cubrid_pdo_driver

We will also try to fix the problem regarding the cubrid-devel package in the following days.

Best regards,

The CUBRID Team

Quote
[Level:3]hellohuizhang

# Post subject:Re: Stuck installing Cubrid on FC15

profile

registered: 05/15/2011

IP: *.91.139.81

Hello!

As you have told us, you only passed 'cubrid:host=localhost;port=33000;dbname=testdb', but our driver also need username and password parameters. So if you use:

$p = new PDO($url, $user, $password); 

It will work well. For example:

<?php
$url = "cubrid:host=localhost;port=33000;dbname=testdb";
$user = "public";
$pass = '';

$conn = new PDO($url, $user, $pass);
?>

If you have any problem, please let us know.

Quote
[Level:0]gabordemooij

# Post subject:Re: Stuck installing Cubrid on FC15

profile

registered: 02/28/2012

IP: *.151.83.165

Thanks, providing the additional username and password does the trick (I recommend to make a note of this in the docs as this does not seem to be necessary for the non-pdo driver).

I appreciate your quick replies thank you.


My next issue (hope you dont get bored) is with installing the manager. I installed the repo as you said for FC15, however...

rpm -i http://yumrepository.cubrid.org/cubrid_repo_settings/8.4.0/cubridrepo-8.4.0-1.fc15.noarch.rpm
yum install cubrid-manager-client

yields:

No package cubrid-manager-client available.

Fortunately the binary package on the site works out of the box so this is not a problem but I just let you know.

Anyway Cubrid is running fine now and the manager GUI looks wonderful. Exciting. Thanks!



Quote
[Level:8]CUBRID

# Post subject:Re: Stuck installing Cubrid on FC15

profile

registered: 03/28/2010

IP: *.91.139.84

Because of your issue reports, we now notice that we need to improve our PHP Driver manual. So thank you, too, for asking questions. You see how much important is to just ask questions or post issues. This will definitely help other users as well.

Regarding, No package cubrid-manager-client available, we will add it to YUM repository.

Quote
[Level:3]Esen Sagynov

# Post subject:Re: Stuck installing Cubrid on FC15

profile

registered: 05/31/2011

IP: *.91.139.82

Another reason for this issue can be that PDO is not installed by default when PHP is installed from YUM.

YUM version of PHP is configured with --enable-pdo=shared which means PDO must be loaded just like other modules. So it is user's responsibility to install PDO prior to installing dependent libraries, and add php.ini record about PDO before defining dependent third-party extensions.

Refer to http://jira.cubrid.org/browse/APIS-415 for more info.

Quote




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: