I have a Internal PHP 7.3 Website that connects to MS Access (2003 / 365). The code is failing on the connection, although I have Microsoft's new 64Bit driver installed. The machine is 64 Bit and I'm using PHP 7.3.
I've listed my code and the setup below. Hopefully someone can give me direction on what I need to do. I've been searching the web for the last 7 days, and I haven't found anything that helps.
I "think" the problem is that PHP seems to be running in 32Bit ODBC mode, but nothing I've tried seems to change the value from 32Bit to 64Bit.
I checked this link which states that PHP and Office need to run at 32Bit, but I was wondering if things have changed in the last 7 years. PHP MS Access connection not working
I've put my entire setup in the attached image from the code to the odbc connection to the phpinfo and error message that I receive: "HTTP ERROR 500".
Here is the code:
<?PHP
$bdconnection = 0;
$bdconn=odbc_connect('WIKITEST','','');
if (!$bdconn)
{
exit("Connection to the WIKITEST Database Failed: " . $bdconn);
}
else {
$bdconnection = 1;
}
?>
Here's the error from the logs:
[09-Mar-2022 13:25:40 America/New_York] PHP Warning: odbc_connect(): SQL error: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Access database engine cannot open or write to the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view and write its data., SQL state S1000 in SQLConnect in C:...\dbtest.php on line 3
Error on Page: Connection to the WIKITEST Database Failed: