RE: [PHP-DB] ODBC not connecting
| From: | Andrew Hill | Date: | Wed, 26 Jul 2000 13:37:25 +0000 |
| Subject: | RE: [PHP-DB] ODBC not connecting | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1515@lists.php.net to get a copy of this message | ||
Aaron,
As long as the odbc.ini in the openlink installation is showing up in your
phpinfo, then that is fine.
That is the correct one to use.
You may want to make sure that those same 3 variables are set in the apache
user's environment before starting apache.
Beyond that, the only thing that is likely is permissions of the apache user
on files in the openlink installation.
Can 'nobody' (or whomever) cat /usr/local/openlink/bin/odbc.ini ?
Hope this helps.
Best regards,
Andrew
----------------------------------------------------
Andrew Hill
Professional Services Consultant
OpenLink Software
http://www.openlinksw.com
Universal Database Connectivity Technology Providers
-----Original Message-----
From: Aaron Heidel [mailto:aaronheidel@yahoo.com]
Sent: Tuesday, July 25, 2000 11:49 PM
To: ahill@openlinksw.com; 'Php (E-mail)'
Subject: RE: [PHP-DB] ODBC not connecting
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
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net