0

I upgraded php from 7.0 to 7.2 on my Windows2012 server, and now my php script cannot access my MS Access database. Everything worked fine until the moment I upgraded. I made sure pdo_odbc.dll is enabled in the new php.ini. I get the error: Uncaught PDOException: SQLSTATE[IM002] SQLDriverConnect: 0 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Drivers for MS Access are installed, but they are 32-bit. I am looking in both the ODBC Administrator dialogs. Drivers are there in the 32-bit and not in the 64-bit. The server is 64 bit and the new php is 64-bit. Windows on the server is all 32-bit and I cannot change this. Windows installer refuses to install the 64-bit drivers. I tried to install 64-bit drivers from the command line with the /passive switch as referenced here: Hand Install of 64-bit MS Access ODBC drivers when 32-bit Office is present But this did not work, just gave the same error message about you can't install 64-bit drivers because your Windows environment is 32-bit.

Changing databases is, unfortunately, not currently an option.

Am I right that this is an issue with the 32-bit drivers vs 64-bit php? Or could it be something else? Is there any way to get the drivers? If I did, would it endanger the functioning of the database? Thanks for any input.

Kris
  • 1
  • If you can't change the server to 64 bit simply install the 32 bit version of PHP 7.2. – Dave Nov 29 '18 at 17:24
  • Thank you; I should have thought of that. However, upon doing this, and updating the .ini file to make sure the correct extensions are there, I am getting the same error. So my guess as to the bits being the issue is incorrect. odbc is installed according to phpinfo(), and the drivers are there according to the admin tools, so I will keep looking. – Kris Nov 29 '18 at 20:10
  • 1
    This is, after all, solved by installing the 32 bit version of php7.2! I had a typo in my php.ini. Thanks again, Dave. – Kris Nov 29 '18 at 20:27

0 Answers0