简体   繁体   中英

32bit and 64bit ODBC Drivers playing nice with PHP

I am running PHP on a 64bit windows 2008 server. I have both ODBC 32bit and 64bit installed and I attempt to do this:

$dbh = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=$mdbFilename", $username, $password);

The 32bit ODBC install has the driver Microsoft Access Driver (*.mdb) and the 64bit version has the Microsoft Access Driver (*.mdb, *.accdb) which is what I need but PHP says it cant find it and I am assuming PHP is only referencing the 32bit ODBC driver.

Why is this the case? Is it as simple as PHP/Apache being a 32 bit install?

Thanks all for any help

You can configure 32bit odbc settings through admin snap in only by calling it from command line or browse to it in Explorer in folder

C:\Windows\SysWOW64\odbcad32.exe

By default in Administration Tools in Control Panel you will start only 64bit version which PHP will not use.

Now tell me which did you use to configure your odbc connection?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM