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

Glyn Astill glynastill at yahoo.co.uk
Sat Nov 10 12:03:26 GMT 2007


Hi All,

I did as nick said and tried the isql command and it worked, so
unixODBC is working.

However its still not from php. I do have the LD_LIBRARY_PATH set in
the profile for the www-data user.

phpinfo shows the following in the odbc section though:

Active Persistent Links 	0
Active Links 	0
ODBC library 	unixODBC
ODBC_INCLUDE 	-I/usr/include
ODBC_LFLAGS 	-L/usr/lib
ODBC_LIBS 	-lodbc

However I don't seem to see any env vars outputted there?

Cheers people.
Glyn

--- Emiliano Romero <eromero at sitrack.com> wrote:

> 
> Hi!, You should add "/usr/local/psql/lib/" to the LD_LIBRARY_PATH.
> 
> Try this:
> # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/psql/lib/
> 
> If this still don't work, you should see file permission of that
> lib.
> 
> Another thing, you also should try putting:
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/psql/lib/
> in your apache init.d script (/etc/init.d/apache2).
> 
> If nothing of this works, make an script with:
> <?php phpinfo(); ?>
> 
> And send the output for ENV variable LD_LIBRARY_PATH.
> 
> Regards
> 
> -----Mensaje original-----
> De: unixodbc-support-bounces at easysoft.com
> [mailto:unixodbc-support-bounces at easysoft.com] En nombre de Glyn
> Astill
> Enviado el: Viernes, 09 de Noviembre de 2007 12:39 p.m.
> Para: unixodbc-support at easysoft.com
> Asunto: [unixODBC-support] Problems usinf unixOdbc with php5 and
> PervasiveSQL Driver
> 
> 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
> (0xb7df2000)
>         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
> (0xb7daf000)
>         libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7dab000)
>         libgcc_s.so.1 => /usr/local/psql/lib/libgcc_s.so.1
> (0xb7da0000)
>         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.
> Regards
> Glyn
> 
> 
> 
> 
>       ___________________________________________________________
> Yahoo! Answers - Got a question? Someone out there knows the
> answer. Try it
> now.
> http://uk.answers.yahoo.com/ 
> 
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at easysoft.com
> http://mail.easysoft.com/mailman/listinfo/unixodbc-support
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.503 / Virus Database: 269.15.26/1120 - Release Date:
> 09/11/2007
> 09:26 a.m.
> 
> 
> 
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information.
> If you have received it in error, please notify the sender
> immediately and delete the original. Any other use of the email by
> you is prohibited.
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at easysoft.com
> http://mail.easysoft.com/mailman/listinfo/unixodbc-support
> 



      ___________________________________________________________ 
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good  http://uk.promotions.yahoo.com/forgood/environment.html



More information about the unixODBC-support mailing list