开发者

32bit and 64bit ODBC Drivers playing nice with PHP

I am runni开发者_运维问答ng 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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜