PHP OCI8 extensions not working with PHP 7 64 bit

一曲冷凌霜 提交于 2019-12-12 17:04:35

问题


I have installed APACHE 2.4 x64 and PHP7 x64 and download PHP OCI 64bit libraries but the problem is that whenever I run PHP script from cli it says

PHP Startup: Unable to load dynamic library 'E:\software\server\php-7.0.11-Win32-VC14-x64\ext\php_oci8_11g.dll' - %1 is not a valid Win32 application

Also when I invoke the webapplication from URL it says

Call to undefined function oci_pconnect()

The OCI extension I downloaded are also 64bit. Here is the link:

http://windows.php.net/downloads/pecl/releases/oci8/2.1.2/php_oci8-2.1.2-7.0-ts-vc14-x64.zip

Can someone guide on this problem.


回答1:


You've probably mixed TS (thread safe) and NTS (non-thread safe) versions. These will not work together. Find out more about PHP thread safety here.

PHP 7.0.11 NTS x64, OCI8 2.1.2 NTS x64, and InstantClient 11.2.0.4.0 x64 work perfectly well together (I've just downloaded these three files and tested them in a fresh Win2K8 environment).

Remember to install the latest VC14 runtime (Visual Studio 2015) and to modify your PATH system environment variable to include the directories of PHP and the InstantClient, e.g. C:\php;C:\instantclient_11_2.



来源:https://stackoverflow.com/questions/39664801/php-oci8-extensions-not-working-with-php-7-64-bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!