[Wine] use wine odbc in ubuntu php application

Martin Gregorie martin at gregorie.org
Thu Feb 2 10:12:33 CST 2012

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



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.


More information about the wine-users mailing list