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

Sebastian P. sebastienp_2000 at yahoo.com
Thu Mar 29 19:35:10 BST 2012


Hi Nick, 

Thank you for the information. I made the changes and seems that I can connect to the database now it crashes when executing the query. (Segmentation fault) 

I think there is something else messed up with the distribution in CentOS. 

Do you know if there is a way to get unixODBC without installing through yum?

Thank you. 

SP

--- On Thu, 3/29/12, Nick Gorham <nick at lurcher.org> wrote:

> From: Nick Gorham <nick at lurcher.org>
> Subject: Re: [unixODBC-support] SQL error: [unixODBC][Driver Manager]Can't open cursor lib 'libodbccr'
> To: sebastienp_2000 at yahoo.com, "Support for the unixODBC project" <unixodbc-support at mailman.unixodbc.org>
> Date: Thursday, March 29, 2012, 1:40 PM
> 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