ORACLE 12c + PHP 5.6.13(Win32) - 无法加载php_pdo_oci.dll

ORACLE 12c + PHP 5.6.13(Win32) - 无法加载php_pdo_oci.dll

问题描述:

Database-Server: ORACLE 12c

App-Server: Windows NT SERVER1 6.3 build 9200 (Windows Server 2012 R2 Standard Edition) i586

Apache: Apache/2.4.16 (Win32) PHP/5.6.13

PHP: php-5.6.13-Win32-VC11-x86

With this components I try to execute this small php script and get this warning:

<?php

    foreach(PDO::getAvailableDrivers() as $driver)
      {
      echo $driver.'<br />';
      }  

?>

Warning: PHP Startup: Unable to load dynamic library 'C:/Program Files (x86)/php-5.6.13-Win32-VC11-x86/ext\php_pdo_oci.dll' - %1 ist keine zulässige Win32-Anwendung.
 in Unknown on line 0

Translation so far: %1 is no allowable Win32-Application

Question: PHP 5.6.13 (Win32) cannot load the ext/php_pdo_oci.dll library because of "this ist no Win32-Application" ?

Don't know what's wrong.

数据库服务器: strong> ORACLE 12c p>

App-Server: strong> Windows NT SERVER1 6.3 build 9200(Windows Server 2012 R2标准版)i586 p>

Apache: strong> Apache / 2.4。 16(Win32)PHP / 5.6.13 p>

PHP: strong> php-5.6.13-Win32-VC11-x86 p>

使用这些组件,我尝试执行这个小的PHP脚本并收到此警告: p>

 &lt;?php 
 
 foreach(PDO :: getAvailableDrivers()as $ driver  )
 {
 echo $ driver。'&lt; br /&gt;'; 
} 
 
?&gt; 
 
警告:PHP启动:无法加载动态库'C:/ Program Files(x86)  )/php-5.6.13-Win32-VC11-x86/ext\php_pdo_oci.dll' - %1 istkeinezulässigeWin32-Anwendung。
在第0行的未知
  code>  pre> 
 \  n 

到目前为止的翻译:%1是不允许的Win32-Application strong> p>

问题: strong> PHP 5.6.13(Win32 )无法加载ext / php_pdo_oci.dll库,因为“这不是Win32-A 应用“? p>

不知道出了什么问题。 p> div>

Just for close this question the solution.

32-bit PHP needs 32-bit Oracle client

To check what Oracle-Client is installed use TNSPING with this small windows script (CMD). myoracledb based on TNSNAMES.ORA entry.

tnsping myoracledb
pause

The result should something like this...

    TNS Ping Utility for 32-bit Windows: Version 12.1.0.1.0 - Production on 28-SEP-2015 10:51:44

    Copyright (c) 1997, 2013, Oracle.  All rights reserved.
[...]

..for 32-bit Windows or ...for 64-bit Windows