Shared by PB - a 3-day exchange of emails with Nettigritty support for the following:
(our site) which runs on PHP 5.6.40 has x86 architecture with ODBC Library Win32
(our beta site) which runs on PHP 7.4.3 has x64 architecture with ODBC Library as Win32 (should have been Win64)
We request you to install either of the following options:
1. Win64 version of the ODBC library for PHP 7.4.3 (64 bit)
or
2. Win32 version of the ODBC library for PHP 7.4.3 (32-bit)
We get the error odbc_connect(): SQL error: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application, SQL state IM014 in SQLConnect
PB also shared that we are using a connect-string like
$db_connection_variable = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$dbq", '', '', SQL_CUR_USE_ODBC);
and that Plesk logs for our domain show the error
odbc_connect(): SQL error: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application, SQL state IM014 in SQLConnect
https://webcheatsheet.com/php/odbc_connection.php "
$conn = new COM ("ADODB.Connection")
or die("Cannot start ADO");
Stack trace: etc
Nettigritty - ... please find various types of connection strings for accessing Access details at https://www.connectionstrings.com/access/ and https://www.php.net/manual/en/function.odbc-connect.php
Please note that the server already has ODBC drivers already installed and a screenshot for the same was already shared you to confirm the same. Please note.
We recommend even switching your MS Access database to MSSQL database for better security and compatibility with newer scripts. ...
PB replied that we have already tried all the links etc. Finally, Nettigritty replied,
we have enabled COM class for you for PHP and you could see the error for your application directly from https://beta.radiosai.org/
On checking further, we find the DSN created through Plesk is being created as 32bit only.
Either it is required to use the application in 32bit or we can delete and try adding the DSN directly from server under 64 bit to see if that helps. But we recommend doing the application in 32bit as creating the DSN through plesk only will be active and migrate when there is any OS upgrade at a later point of time.
Regarding installing 64-bit ODBC driver, they said,
This is a pending feature requested to Plesk on Windows.
Presently, please share details to manually recreate your DSN on 64 bit ODBC on the server.
They manually created the system DSN, and then the connection worked for PB.
No comments:
Post a Comment