I am using Sage to connect via odbc using PHP. This was working fine until a recent upgrade to version 31 but stopped working from there.
The issue is the DSN works fine through Excel and therefore Sage support can’t take it any further.
I have installed PHP 8.4.4 (and also 8.1.3) and am running the code directly from the command line but using $db = new PDO('odbc:MyName');
and nothing else The driver doesn't support the version of ODBC behaviour that the application requested.
.
If I try $db = odbc_connect('MyName');
I get the error The driver returned invalid (or failed to return).
After a lot of research I am well aware that the standard options seem to be mismatches between 32bit and 64bit systems, however Sage, PHP and the ODBC System DSN are all 32bit, so I don’t believe this is the issue.
In the PDO instance the password and username are ommitted and the error doesn’t reference this so it clearly can’t even connect to the DSN yet Excel can.
Interestingly the Sage guy created a test DSN to the local Demo company – that fails too via PHP (same Driver) so I’m wondering if its a driver update issue? The OS is 64 bit.
I’ve also created a UDL file and tested the 64 bit version and that (as well as the 32 through Excel) works fine. I’ve also tried PHP 8.1 64bit -> 64bit driver and that fails too.