ODBC not connecting

From: Date: Tue, 25 Jul 2000 00:07:54 +0000
Subject: ODBC not connecting
Groups: php.db 
Request: Send a blank email to php-db+get-1447@lists.php.net to get a copy of this message
Hi all, I'm using RedHat 6.2, PHP 4.0.1pl2, and OpenLink to connect via ODBC to MSSQL running on Windows NT. I've been able to correctly configure OpenLink's software, and running their /samples/ODBC/odbctest program on our DSN worked fine. The problem is when I try to connect in a php script. I use this code to connect: ***begin code putenv("LD_LIBRARY_PATH=/usr/local/openlink/lib"); putenv("ODBCINSTINI=/usr/local/openlink/bin/odbcinst.ini"); putenv("ODBCINI=/usr/local/openlink/bin/odbc.ini"); $conn = odbc_connect("my_test","sa","") or die("Couldn't connect!"); ***end code But it spits out: ***begin output 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 26 Couldn't connect ***end output The only thing I can figure is that I somehow misconfigured PHP. That is, PHP doesn't know about OpenLink yet. The following is a record of the OpenLink PHP config process: ***begin config cd /usr/src/php-4.0.1pl2 ./configure \ --with-openlink=/usr/local/openlink/ \ --with-apache=/usr/src/apache_1.3.12 \ --prefix=/usr \ --with-config-file-path=/etc/httpd \ --with-exec-dir=/usr/bin \ --with-system-regex \ --enable-magic-quotes \ --enable-calendar \ --with-zlib \ --enable-ftp # in /usr/local/openlink/odbcsdk/include/isql.h insert the following line at line 9: typedef long SQLINTEGER_FIX; # in /usr/src/php-4.0.1pl2/ext/odbc/php_odbc.h insert the following line at line 117: #define SQLINTEGER SQLINTEGER_FIX make make install ***end config But, when I restart apache, and look at phpinfo(), my configure command is still: ./configure' '--with-mysql' '--with-apache=/usr/src/apache_1.3.12' '--prefix=/usr' '--with-config-file-path=/etc/httpd' '--with-exec-dir=/usr/bin' '--with-system-regex' '--enable-magic-quotes' '--enable-calendar' '--with-zlib' '--enable-ftp' Can anyone help me figure out how to fix this? Thanks, aaron aaronheidel@yahoo.com __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com

« previous php.db (#1447) next »