dsn-less connection , php to a ms-access database in linux

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
jayakrishnan
Forum Newbie
Posts: 1
Joined: Tue Jun 12, 2007 6:13 am

dsn-less connection , php to a ms-access database in linux

Post by jayakrishnan »

Hi

My first post here. I created a small project using php+ms access+apache under windows and used the following code to connect to the access database

Code: Select all

$db_conn = new COM("ADODB.Connection");
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("./auth.mdb").";";
$db_conn->open($connstr);
We have now moved to a linux server which obviously wont support the above code as it uses COM. Is there any way to create dsn-less connection to access database under linux using php?

Thanks & Regards
JayaKrishnan
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

(afaik) you'll have to search for the 'unix'-odbc driver and go down the odbc route...
Post Reply