RE: [PHP-DB] ODBC not connecting

From: Date: Tue, 25 Jul 2000 12:51:11 +0000
Subject: RE: [PHP-DB] ODBC not connecting
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-1463@lists.php.net to get a copy of this message
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 -----Original Message----- From: Aaron Heidel [mailto:aaronheidel@yahoo.com] Sent: Monday, July 24, 2000 8:08 PM To: Php (E-mail) Subject: [PHP-DB] ODBC not connecting 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 -- 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

« previous php.db (#1463) next »