简体   繁体   English

32位和64位ODBC驱动程序与PHP配合使用

[英]32bit and 64bit ODBC Drivers playing nice with PHP

I am running PHP on a 64bit windows 2008 server. 我在64位Windows 2008服务器上运行PHP。 I have both ODBC 32bit and 64bit installed and I attempt to do this: 我同时安装了ODBC 32位和64位,并且尝试这样做:

$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. 32位ODBC安装具有驱动程序Microsoft Access Driver (*.mdb) ,而64位版本具有Microsoft Access Driver (*.mdb, *.accdb) ,这是我所需要的,但是PHP表示找不到它,并且我假设PHP仅引用32位ODBC驱动程序。

Why is this the case? 为什么会这样呢? Is it as simple as PHP/Apache being a 32 bit install? 它像32位安装的PHP / Apache一样简单吗?

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 您只能通过命令行调用或在文件夹的资源管理器中浏览到它,才能通过管理单元来配置32位odbc设置

C:\Windows\SysWOW64\odbcad32.exe

By default in Administration Tools in Control Panel you will start only 64bit version which PHP will not use. 默认情况下,在“控制面板”的“管理工具”中,您将仅启动PHP不会使用的64位版本。

Now tell me which did you use to configure your odbc connection? 现在告诉我您用来配置odbc连接的是哪个?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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