Access from PHP to .mdb file on Ubuntu

I’ve got a problem of obtaining access to .mdb file (MS-Access db) on Ubuntu. I need full access(read and write too).
Originally project was built on Windows using odbc (and everything has worked well). But when I moved it on linux-server appeared problems.
At the moment PHP-extensions for work with odbc are installed. But I can’t find any free ODBC-driver for work with Access. I’ve tried to use MDB Tools but seems it works only for reading.
Maybe somebody can suggest any solution? Usage of some another DB is not appropriate, because my boss is against it.
Thanks for any help.

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

By installing mdbtools from the Linux repository you can work with mdb in Linux.
mdbtools is a free package that can solve your problem.

Take a look at this tutorial

Solution 2

You can read/write MS Access files using ADODB, the PHP libraries for ADODB can be found here:
http://adodb.sourceforge.net/

Solution 3

Thanks everybody for your help. Finally we decided to use another DB. My answer on this question – it’s impossible(if you need to write to DB) to use Access DB on linux based only on free solutions. If you need only read you can use MDB tools with PDO. If you’re ready to pay you can try EasySoft solutions.

Solution 4

I’ve just used RebaseData

apt-get install curl libreoffice-calc 
curl -F files[][email protected] https://www.rebasedata.com/api/v1/convert?outputFormat=csv -o output.zip

Solution 5

You can link the access database to a free SQLServer Express Edition. Then you can insert or select data from any access table using freetds and unixodbc from your linux box. Yes, you need a windows box in your network with the access file and the SQLExpress service. Any database with windows support (DBF, XLS, etc.) can be used this way.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply