PHP OCI8扩展不适用于PHP 7 64位 [英] PHP OCI8 extensions not working with PHP 7 64 bit

查看:534
本文介绍了PHP OCI8扩展不适用于PHP 7 64位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了APACHE 2.4 x64和PHP7 x64,并下载了PHP OCI 64位库,但是问题是,每当我从cli运行PHP脚本时,它都会显示

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启动:无法加载动态库 'E:\ software \ server \ php-7.0.11-Win32-VC14-x64 \ ext \ php_oci8_11g.dll'- %1不是有效的Win32应用程序

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

另外,当我从URL调用Web应用程序时,它说

Also when I invoke the webapplication from URL it says

调用未定义的函数oci_pconnect()

Call to undefined function oci_pconnect()

我下载的OCI扩展也是64位的.这是链接:

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

有人可以指导这个问题吗?

Can someone guide on this problem.

推荐答案

您可能已经混合使用TS(线程安全)和NTS(非线程安全)版本.这些将无法一起工作.在此处了解更多有关PHP线程安全的信息.

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 和InstantClient

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).

请记住要安装最新的VC14运行时(Visual Studio 2015)并修改PATH系统环境变量以包括PHP和InstantClient的目录,例如C:\php;C:\instantclient_11_2.

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.

这篇关于PHP OCI8扩展不适用于PHP 7 64位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆