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

Nick Gorham nick at lurcher.org
Thu Mar 29 18:40:56 BST 2012


On 29/03/12 18:31, Sebastian P. wrote:
> 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
Hi,

if the version of unixODBC was 2.2.14, I would have expected the cursor 
lib to be libodbccr.so.1.0.0 and so on. It may be the creator of the 
distribution changed the version but didnt change the code that loads 
the lib. Try creating a link from

/usr/lib64/libodbccr.so.2

to

/usr/lib64/libodbccr.so.1

and the same from .1.0.0 to .2.0.0

and see if that helps.

-- 
Nick


More information about the unixODBC-support mailing list