且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

消息“找不到驱动程序"的未捕获异常"PDOException"(到Oracle DB)

更新时间:2023-11-19 21:59:10

除了在PHP配置中启用php_pdo_oci.dll之外,还必须在系统上安装ORACLE驱动程序. PHP扩展只是您的PHP代码与ORACLE驱动程序(即所谓的Instant Client)之间的接口.

As well as enabling php_pdo_oci.dll in your PHP configuration, you also have to have an ORACLE driver installed on your system. The PHP extension is just an interface between your PHP code and the ORACLE driver, or Instant Client as it is called.

因此,根据您使用的ORACLE版本,将取决于您激活的特定扩展名,然后取决于还必须将特定的Instant Client加载到运行Apache和PHP的系统上.

So depending on the Version of ORACLE you are using will depend the specific extension you activate and then the specific Instant Client that you also have to load onto the system running your Apache and PHP.

还必须激活通用

;extension=php_oci.dll      

以及其中一个特定的版本扩展名.

And one of the specific version extensions.

;extension=php_oci8.dll      ; Use with Oracle 10gR2 Instant Client
;extension=php_oci8_11g.dll  ; Use with Oracle 11gR2 Instant Client
;extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client