RE: [PHP-DB] ODBC not connecting
| From: | Aaron Heidel | Date: | Wed, 26 Jul 2000 03:49:00 +0000 |
| Subject: | RE: [PHP-DB] ODBC not connecting | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1502@lists.php.net to get a copy of this message | ||
Andrew,
Thanks for the help. I played a bit more with the php and apache compiles,
and I've got phpinfo() showing '--with-openlink=/usr/local/openlink' now, so
I think the php+apache configuration is out of the way.
Now, though, I am still unable to get odbc_connect() to work. I suspect it
has something to do with the location of the environment variables.
Following your instructions at http://www.iodbc.org/odbc-phpHOWTO.html , I
ended up with the following env vars:
LD_LIBRARY_PATH=:/usr/local/openlink/lib
ODBCINI=/usr/local/openlink/bin/odbc.ini
ODBCINSTINI=/usr/local/openlink/bin/odbcinst.ini
When I use putenv() in a php script to set up these variables, and then try
connecting with odbc_connect(), it still spits back:
Warning: SQL error: [iODBC][Driver Manager]Data source name not found and
no default driver specified. Driver could not be loaded, SQL state IM002 in
SQLConnect in /home/httpd/html/php/odbc_test.php on line 73
Are there any other considerations about variables I should be aware of?
Should I be using /etc/odbc.ini and /etc/odbcinst.ini instead? It appears
that *.ini in /usr/local/openlink/bin/ contain the correct info: that is,
the correct DSN definition: [my_test], and the correct ODBC driver:
[OpenLink Generic ODBC Driver]. I'm kind of confused at this point.
Thanks for all your help!
aaron
aaronheidel@yahoo.com
-----Original Message-----
From: Andrew Hill [mailto:ahill@openlinksw.com]
Sent: Tuesday, July 25, 2000 8:51 PM
To: Aaron Heidel; Php (E-mail)
Subject: RE: [PHP-DB] ODBC not connecting
Aaron,
It's possible that you have a problem with the trailing slash on
the --with-openlink=/usr/local/openlink/ line, eg. try it
with --with-openlink=/usr/local/openlink
Hope this helps.
Best regards,
Andrew
----------------------------------------------------
Andrew Hill
Professional Services Consultant
OpenLink Software
http://www.openlinksw.com
Universal Database Connectivity Technology Providers
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com