PHP and Easysoft ODBC

From: Date: Wed, 19 Jul 2000 16:57:40 +0000
Subject: PHP and Easysoft ODBC
Groups: php.db 
Request: Send a blank email to php-db+get-1292@lists.php.net to get a copy of this message
Our system administrator recently installed ESOOB and PHP4 on our servers. I'm able to use the demo program to connect to the database from our linux server. I changed the odbc.ini file to point to our dsn and use our username and password, and all is well. However, I am not nearly as Successful when trying the same using PHP. I am using this code: <? $link = odbc_connect("data_source_name", "username", "password"); phpinfo(); ?> the strings sent are changed here, but in the real program they match what is in the odbc.ini file. I am getting the following error: Warning: SQL error: [Easysoft ODBC (Client)]Data source not found and no default driver specified, SQL state IM002 in SQLConnect in /path/filename.php on line 7 phpinfo() shows this as the configure command for php: './configure' '--prefix=/usr' '--with-apxs' '--with-mysql' '--with-esoob' In the ODBC section it gives the following information(path is substituting the real path): ODBC library | ESOOB ODBC_INCLUDE | -l/path/easysoft/oob/client/include ODBC_LFLAGS | -L/path/easysoft/oob/client/lib ODBC_LIBS | -lesoobclient I've searched for similar problems in newsgroups as well as the PHP mailing lists and found some people had to include this line into their programs: putenv("ODBCINI=/path/easysoft/oob/examples/odbc.i ni"); I tried this and used the correct path to the odbc.ini file and got the same results. The only difference was that ODBCINI | /path/easysoft/oob/examples/odbc.ini also showed up in phpinfo() Does anyone have any ideas about how I can get php working with easysoft?? Jason Stechschulte jpstech@nc.edu

« previous php.db (#1292) next »