Installed LAMP on an offline Ubuntu 22.04 box to test odbc-mdbtools setup ready for an online server which needs to read and write to MS Access for sending/accepting with Microsoft-based tablets (before anyone says why do such a thing).
Put unixODBC on first, then odbc-mdbtools (before realising it would add it anyway). Edited php.ini to enable the pdo-odbc extension. Getting no response from tests, looked at phpinfo and spotted pdo-odbc wasn't installed with php8.1. Installed it with
suo apt-get install php-odbc
Now got odbc showing in phpinfo output but test script still not connecting but throwing as error showing it was trying to use mysql. So, did a sudoedit of pdo-odbc.ini:
#; configuration for php odbc module
; priority=20
extension=pdo_odbc.so
Tried altering the extension to 'libodbc.so' which is the unixODBC substitution but that produced an output from the test script saying there was 'no driver found'. The extension is certainly available './usr/lib/x86_64-linux-gnu/libodbc.so'
How can I get php-pdo to work with it (even tried purging unixodbc and odbc-mbtools and reinstalling just odbc-mdbtools in the hope it would pop the extension inot the ini file itself).