Re: use wine odbc in ubuntu php application

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2012-02-02 at 08:42 -0600, sillentkil wrote:
> Hi,
> I got a big project where i need to read an visual fox pro database,
> got this working on a windows server running php. But i would like to
> run this app on a linux machine(ubuntu 11.10). My idea was to use wine
> to setup the odbc driver and connect to it using php running on my
> linux machine. Now my question is if this is posible?
> 
PHP has a native ODBC implementation for Linux, so why go to the trouble
of adding Wine to the mix? PHP also offers an ODBC alternative via PEAR.
Both work just fine, though I'll admit I used them to access PostgreSQL
rather than FoxPro.

There doesn't seem to be a native FoxPro driver for PHP ODBC, but there
is a workround. PHP ODBC can link in Unified ODBC's unixODBC, which
supports ODBC-ODBC  Bridge. This, it says, allows access to any ODBC
data source on a Windows machine. Links:

native ODBC
http://php.net/manual/en/intro.uodbc.php

unixODBC 	
http://www.unixodbc.org/

ODBC-ODBCbridge
http://www.easysoft.com/products/data_access/odbc_odbc_bridge/index.html

I've used unixODBC in the past in a very different environment (on a DEC
Alpha machine to access the Red Brick data warehouse via its standard
Windows ODBC driver from C programs. That 'just worked', so there's no
reason it wouldn't work equally well from PHP on Linux. unixODBC acts as
a wrapper for the Windows ODBC driver. 

Alternatively you can use PEAR, http://pear.php.net/ - specifically the
DB-odbtp package, http://pear.php.net/package/DB_odbtp which provides
access to Win32-ODBC databases.


Martin





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux