[unixODBC-support] unixODBC-support Digest, Vol 102, Issue 3

Thomas Kienast tomk at milt.at
Mon Apr 8 18:46:11 BST 2013


Am 05.04.2013 14:00, schrieb unixodbc-support-request at mailman.unixodbc.org:

> Message: 1
> Date: Thu, 04 Apr 2013 14:27:17 +0300
> From: Thomas Kienast<tomk at milt.at>
> Subject: Re: [unixODBC-support] unixODBC-support Digest, Vol 102,
> 	Issue 2
> To: unixodbc-support at mailman.unixodbc.org
> Message-ID:<515D6395.5000309 at milt.at>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> I installed unixodbc and freetds, but when I try to establish a
> connection via php I receive this error message:
>
> Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open
> lib '/opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2260.0' : file
> not found, SQL state 01000 in SQLConnect in ......
>
> Actually '/opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2260.0' is
> existant on exactly this path.
>
> But I realized in my php script that the file mentioned in this line
>
> putenv("FREETDSCONF=/etc/freetds/freetds.conf");
>
> is not existant on the server. Maybe the freeTDS installation was not
> successful?
>
> I am not very good in Linux and I think anyone who is experienced could
> do this installation within short time. So I hope for some way of doing
> a guided installation via Skype or something...
>
>
>> Thomas,


> Just shooting in the dark here, but does the webserver have rights to
> that file?

-rwxr-xr-x

> What happens when you do the steps here?
>
> http://freetds.schemamania.org/userguide/confirminstall.htm

web2:/ # tsql -C
Compile-time settings (established with the "configure" script)
                             Version: freetds vdev.0.92.377
              freetds.conf directory: /usr/local/etc
      MS db-lib source compatibility: no
         Sybase binary compatibility: no
                       Thread safety: yes
                       iconv library: yes
                         TDS version: 5.0
                               iODBC: no
                            unixodbc: yes
               SSPI "trusted" logins: no
                            Kerberos: no

Then to
---------------------------------
Example 3-3. Failure to find servername in freetds.conf

	$ tsql -S nobox -U sa
---------------------------------

What do I enter for 'nobox' and what for 'sa'? 'nobox' the server's 
hostname?

I got this info:

General information:

Server: mail.great-lengths.at or 188.21.91.138
User: web
Pass: **********
DB: BMD

ODBC Config Windows:

Server: mail.great-lengths.at\BMD
Client configuration: Not dynamically, but 1433

> Are you sure thats the right lib? That looks like a MS driver, not freetds.
>
> But is thats what you expect, its probably a lib that hat driver needs
> that is missing. Try
>
> ldd /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2260.0

web2:/ # ldd /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2260.0
         linux-vdso.so.1 =>  (0x00007fffab9ff000)
         libcrypto.so.0.9.8 => not found
         libdl.so.2 => /lib64/libdl.so.2 (0x00007f874aaf6000)
         librt.so.1 => /lib64/librt.so.1 (0x00007f874a8ed000)
         libssl.so.0.9.8 => not found
         libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f874a6e7000)
         libodbcinst.so.1 => /usr/lib64/libodbcinst.so.1 
(0x00007f874a4cf000)
         libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007f874a204000)
         libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 
(0x00007f8749fcd000)
         libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f8749cc3000)
         libm.so.6 => /lib64/libm.so.6 (0x00007f8749a6c000)
         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f8749855000)
         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8749638000)
         libc.so.6 => /lib64/libc.so.6 (0x00007f87492d8000)
         /lib64/ld-linux-x86-64.so.2 (0x00007f874b0d9000)
         libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 
(0x00007f87490b0000)
         libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f8748eac000)
         libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 
(0x00007f8748ca3000)
         libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f8748a9f000)
         libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f8748888000)


Any conclusions out of this all?

Thanks
Thomas


More information about the unixODBC-support mailing list