RE: [PHP-DB] Accessing MS Access databases on/from a UNIX file system

From: Date: Thu, 05 Oct 2000 12:58:19 +0000
Subject: RE: [PHP-DB] Accessing MS Access databases on/from a UNIX file system
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-3350@lists.php.net to get a copy of this message
Hi John, I cannot speak to putting Access on Unix, my understand was that that was not possible - perhaps Cold Fusion can do something but it's not my baliwick :) What I can explain is how to connect from a Unix/PHP box to MS/Access box. There is a HOWTO regarding PHP-ODBC at www.iodbc.org which explains how to compile in either general iODBC support (driver manager, but no drivers) or Openlink ODBC support (The iODBC driver manager and Openlink's commercial drivers). Then, normal Openlink install process, minus specific database support: 1. install Openlink Multi-Tier drivers, with Unix as client, Win as the server - don't bother selecting a database, but do be sure to the "optional" component of ODBC Agent is installed on the Win side. The Win installer is an interactive web-based installer. When the list of components comes up in the installer, higlight the "Database Agents" selection, hit the "Change" button, and make sure that you are installing the ODBC Agent. It may come by default, as well, and will show up in the openlink/bin directory. Connecting to Access on a Win32 box isn't too terribly difficult, but here is the 'trick'.. 2. setup a DSN in the ODBC Administrator Control Panel (Win) using the Microsoft Driver for Access, pointing to your Access mdb in question. Let's name this DSN "foo" for the example. 3. setup a DSN on the Unix box, in the odbc.ini file. It's pretty self explanatory, but make the ServiceType = ODBC, Database = foo, and Host = <windows box name or IP> Now some minor details people seem to miss :) 4. make sure that the environment variables specified in the openlink.sh file are applied to your environment before starting apache, and also pass them into your PHP script. I usually create a file called odbc_env.inc, and include() it at the top of any page that needs ODBC. Sample contents would be: putenv("ODBCINI=/path/to/openlink/bin/odbc.ini"); putenv("ODBCINSTINI=/path/to/openlink/bin/odbcinst.ini"); putenv("LD_LIBRARY_PATH=/path/to/openlink/lib"); That should do it! Openlink will also provide free support to get you up and running, at http://www.openlinksw.com/support/suppindx.htm Hope this helps. Best regards, Andrew ---------------------------------------------------- Andrew Hill Director Technology Evangelism OpenLink Software http://www.openlinksw.com XML & E-Business Infrastructure Technology Provider > -----Original Message----- > From: John Hockaday [mailto:johnh@erin.gov.au] > Sent: Wednesday, October 04, 2000 10:49 PM > To: php-db@lists.php.net > Cc: johnh@erin.gov.au > Subject: [PHP-DB] Accessing MS Access databases on/from a UNIX file > system > > > Hi, > > I have been following the discussion on accessing an MS Access database > on a UNIX file system via the PHP FAQ at URL: > > http://www.php.net/FAQ.php#4.2 > > I am very new to PHP and I am about to look at a Cold Fusion evaluation > copy. Our resources are limited so I would prefer to use PHP rather > than having to justify purchasing Cold Fusion. > > We have an MS Access database sitting on our Solaris 2.6 UNIX file > system, which is accessed by the PC's using SAMBA software. > > I believe that Cold Fusion can be used to access this MS Access > database without having to connect to a PC. It can also strip out > parts of the database and present it as a MS Access database for > downloading. > > I was wondering if PHP can also do this. When I look at the FAQ I > notice that Tim Hayes suggests that OpenLink products should be used to > access the MS Access databases on a PC filesystem. When I go to the > OpenLink software site I became confused as to which software I should > use to make this connection. Can someone help me with that one? > > I hope to use this list to work out if and how PHP can access a MS > Access database located on a UNIX system or a PC. I then hope to use > the install list to find out what I need to do to install the OpenLink > software and PHP with an Apache web server. > > I hope that this email is appropriate for this list and thanks in > advance to anyone who can answer my questions or point me to some place > where they can be researched. > > > Johnh > > > -- > 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 (#3350) next »