Report this

What is the reason for this report?

install php odbc extension

Posted on April 7, 2016

I’m trying to connect to a MS Access db via PHP using ODBC. I’ve tried with the PHP PDO lib as well as ADODB (http://adodb.org/) – but neither works.

PDO returns: could not find driver: PDO->__construct(‘odbc:DRIVER={Mi…’) ADODB returns: Call to undefined function odbc_exec()

I think I’ve installed the ODBC extension properly. I installed:

apt-get install libmdbodbc1 apt-get install libodbc1 apt-get install php5-odbc apt-get install libmyodbc

…basically every odbc related lib I came across. still no luck.

Any tips or suggestions?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I came here looking for a resolution to an issue reading an access database. This GIST article may be of use. https://gist.github.com/amirkdv/9672857

I can access the database using mdbtools but from apache a fault is thrown the first time I try to issue a prepared statement.

Did you get this working?

This comment has been deleted

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.