[unixODBC-support] SQL error: [unixODBC][Driver Manager]Can't open cursor lib 'libodbccr'

Sebastian P. sebastienp_2000 at yahoo.com
Thu Mar 29 18:31:11 BST 2012


Hi, 

I am trying to run a PHP program, which connects to a database through ODBC. I am getting the following message:

PHP Warning:  odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open cursor lib 'libodbccr' : file not found

This is a 64-bit configuration and I can see those libraries in /usr/lib64 : 

/usr/lib64/libodbccr.so 
/usr/lib64/libodbccr.so.2   
/usr/lib64/libodbccr.so.2.0.0 

Those first 2 are linked to the third one. The version of unixODBC is unixODBC.x86_64                                      2.2.14-11.el6  

I am using this connection in php:

if ($conn_id=odbc_connect("mytest","xxxxxxx","xxxxxx",  SQL_CUR_USE_ODBC)

If I don't use SQL_CUR_USE_ODBC it works. I can test with isql and works I can get my data. 

I found a post in  internet about "SHLIBEXT" not being added when unixODBC is built and there is a note in release 2.2.11 back in 2005 about this:

"Cope with SHLIBEXT not being set when finding the cursor lib"

I wonder if this issue was fixed for the 32-bit version and now on the 64-bit is not working. Could someone please confirm this is a bug?

Thank you .

SP



More information about the unixODBC-support mailing list