|
|
Choosing A Webhost: |
Re: ODBC PHP DB2 Help!: msg#00045db.mdb-tools.devel
Actually, iODBC is broken. We have a global (g_mdb_sql) used for the lex/yacc stuff and for whatever reason iODBC didn't like a global in a shared library and just didn't work right. I'd like to have a resolution on this at some point but there are more important fish to fry. Re: ODBC. IFAIK, DB2 CLI is API compatible with ODBC but only optionally uses a driver manager (direct linking). So, the trick here would likely be to compile PHP with --with-unixODBC and *not* with --with-ibm-db2 (from memory, may have the option a little wrong), and then configure unixODBC with the so library for DB2 (I can probably look up the proper file tomorrow at work, but you may be better off checking the unixodbc mailing list archive). Sorry, but this is the extent of my knowledge on the subject. Brian On Thu, 25 Mar 2004 09:09:47 -0800 (PST), Jeff Smith wrote: > > OK, I am finally up to speed. After rereading your original message, > I see that while mdbtools and unixodbc are fine, the issue is that > PHP is using the DB2 Connect libraries rather than the unixodbc ones. > > To my knowledge, mdbtools has only been tested against iodbc and > unixodbc. Unfortunately, I have no idea how DB2 Connect stores > DSN information. Is there a free version (preferably for i386 Linux) > of it available that could be used for testing this out? > > -- Jeff Smith > > > --- Shannon Sumner <SSumner@xxxxxxxxxxxxxxxxxxx> wrote: > > > > Hello, > > I'm using Bryan Mills post located at > > http://bryanmills.net:8086/archives/000099.html > > <http://bryanmills.net:8086/archives/000099.html> to connect PHP on > my > > Linux Server to an Access database located on my network. I'm having > no > > problems installing UnixODBC and MDBTools. I can get MDBTools to > connect to > > the database so I know it's not a network issue. I've completed > Bryan Mills > > installation steps word for word and yet have not been able to get > PHP to > > access the data. > > Here's the error I get: > > odbc_connect(): SQL error: [IBM][CLI Driver] SQL1013N The database > alias > > name or database name "GAL" could not be found. SQLSTATE=42705, SQL > state > > 08001 in SQLConnect in /home/mis/access.php on line 2 > > I'm convinced since I have IBM DB2 Connect personal addition > installed on my > > server and use the PHP function odbc_connect to access data on my > AS400 that > > I cannot use this function to access databases of another type. I'm > also > > convinced that the DB2 Connect installation has altered my system so > that > > ODBC.ini no longer contains the information about ODBC drivers. > > Do you know how to fix this problem? Does anyone know what file IBM > DB2 > > connect uses to access it's database drivers? If I had this > information - > > perhaps I could alter this file as I would the ODBC.ini and receive > the > > correct data. As you can see I'm totally lost. Any help would be > > appreciated. > > Thanks, > > Shannon Sumner > > My odbcinst.ini file looks as this: > > > > [PostgreSQL] > > Description = ODBC for PostgreSQL > > Driver = /usr/lib/libodbcpsql.so > > Setup = /usr/lib/libodbcpsqlS.so > > FileUsage = 1 > > [MDBToolsODBC] > > Description = MDB Tools ODBC drivers > > Driver = /usr/lib/libmdbodbc.so.0 > > Setup = > > FileUsage = 1 > > CPTimeout = > > CPReuse = > > > > My odbc.ini file looks as this: > > > > [PostgreSQL] > > Description = ODBC for PostgreSQL > > Driver = /usr/lib/libodbcpsql.so > > Setup = /usr/lib/libodbcpsqlS.so > > FileUsage = 1 > > > > [GAL] > > Description = Global Address Database > > Driver = MDBToolsODBC > > Database = /root/GAL.mdb > > Servername = localhost > > UserName = > > Password = > > port = 5432 > > > > My ODBC entries in PHP Info look like this: > > > > ODBC Support enabled > > Active Persistent Links 0 > > Active Links 0 > > ODBC library db2 > > ODBC_INCLUDE -I/home/db2inst1/sqllib/include > > ODBC_LFLAGS -L/home/db2inst1/sqllib/lib > > ODBC_LIBS -ldb2 > > Directive Local Value Master Value > > odbc.allow_persistent On On > > odbc.check_persistent On On > > odbc.default_db no value no value > > odbc.default_pw no value no value > > odbc.default_user no value no value > > odbc.defaultbinmode return as is return as is > > odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes > > odbc.max_links Unlimited Unlimited > > odbc.max_persistent Unlimited Unlimited > > > > > > > > ************************************************ > > This message has been scanned for computer > > viruses and none were found. > > > > Country Curtains Information Systems Department > > ************************************************ > > > > > > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Finance Tax Center - File online. File on time. > http://taxes.yahoo.com/filing.html > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > mdbtools-dev mailing list > mdbtools-dev@xxxxxxxxxxxxxxxxxxxxx > https://lists.sourceforge.net/lists/listinfo/mdbtools-dev ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | mdb-export, Hedgren, Wade (hedgreww) |
|---|---|
| Next by Date: | Re: ODBC PHP DB2 Help!, Jeff Smith |
| Previous by Thread: | Re: ODBC PHP DB2 Help!, Jeff Smith |
| Next by Thread: | Re: ODBC PHP DB2 Help!, Shannon Sumner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |