[unixODBC-support] Problems usinf unixOdbc with php5 and Pervasive SQL Driver

Glyn Astill glynastill at yahoo.co.uk
Fri Nov 9 15:38:39 GMT 2007

Hi People,

I'm new to this list so hello.

I'm trying to get unixODbc working with a driver for Pervasive SQL
from php5 however I'm receiving the following error from php when I
try to connect:

Warning: odbc_connect() [function.odbc-connect]: SQL error:
[unixODBC][Driver Manager]Can't open lib
'/usr/local/psql/lib/odbcci.so' : libpscore2.so.2: cannot open shared
object file: No such file or directory, SQL state 01000 in SQLConnect
in /var/php/pvsql_test.inc.php on line 7

I assume this is something to do with a library not being there, or
not being set up properly.

After installing the Pervasive SQL driver I added the env vars
reconmended in Pervasives docs to my default profile and they seem to
be ther if I do a "set" in the terminal.

One of the variables was:
"LD_LIBRARY_PATH=$PVSW_ROOT/lib:$PVSW_ROOT/bin:/usr/lib ; export
LD_LIBRARY_PATH" which I presume may be important here.

a "ldd /usr/local/psql/lib/odbcci.so" shows the following:

        linux-gate.so.1 =>  (0xffffe000)
        libpscore2.so.2 => /usr/local/psql/lib/libpscore2.so.2
        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7dc4000)
        libuuid.so.1 => /lib/libuuid.so.1 (0xb7dc1000)
        libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0
        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7dab000)
        libgcc_s.so.1 => /usr/local/psql/lib/libgcc_s.so.1
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7c6e000)
        /lib/ld-linux.so.2 (0x80000000)

And if I do a "strace isql dsn 2>st.log" I get quite a lot of errors
in the st.log, I've attached it as it's quite big.

I'm new to odbc with linux (on debian etch btw) so I may have missed
something really dumb.

Any help would be appreciated.

Yahoo! Answers - Got a question? Someone out there knows the answer. Try it

More information about the unixODBC-support mailing list