I would need to connect to Oracle DB in my PHP codes.

我需要在PHP代码中连接到Oracle DB。

I'm using Windows Server 2012, IIS 8 with PHP Manager, and PHP version 5.5.11. I opened IIS PHP Manager, then go to PHP Extensions, then I enabled "php_oci8.dll" extension.

我正在使用Windows Server 2012, IIS 8和PHP Manager,以及PHP版本5.5.5.11。打开IIS PHP管理器,然后转到PHP扩展,然后启用“php_oci8”。dll”扩展。

extension=php_oci8.dll     
;extension=php_oci8_11g.dll

However when I tried to connect to Oracle DB I'm getting the following PHP error:

但是当我尝试连接Oracle DB时,我得到了以下PHP错误:

PHP Fatal error:  Call to undefined function oci_connect()

I just restarted the IIS using the IIS Manager, but didn't done computer reboot. Do I need to reboot?

我只是使用IIS管理器重新启动了IIS,但是没有重启计算机。我需要重新启动吗?

Do I also need to download "instantclient-basic-windows.x64-12.1.0.1.0.zip"? I tried to extract it and put the directory in "Path" environment variable, but still don't work.

我还需要下载“instantclient-basic-window .x64- 12.1.0.1.0.1.0.zip”吗?我试图将它提取出来,并将目录放在“Path”环境变量中,但仍然无效。

PHPInfo's Configure Command:

PHPInfo配置命令:

cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" 
"--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-mssql" 
"--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\x86\instantclient10\sdk,shared" 
"--with-oci8=C:\php-sdk\oracle\x86\instantclient10\sdk,shared" 
"--with-oci8-11g=C:\php-sdk\oracle\x86\instantclient11\sdk,shared" 
"--with-enchant=shared" "--enable-object-out-dir=../obj/" 
"--enable-com-dotnet=shared" "--with-mcrypt=static" 
"--disable-static-analyze" "--with-pgo"

Thank you very much in advance.

非常感谢。

2 个解决方案

#1


0

Try to copy

尝试复制

  • orannzsbbxx.dll
  • orannzsbbxx.dll
  • oci.dll
  • oci.dll
  • oraocieixx.dll
  • oraocieixx.dll

from your instantclient-basic-windows.x64-xxx.zip to C:\Windows\SysWOW64. Then restart IIS service and check phpinfo().

从你的instantclient-basic-windows.x64-xxx。邮政,C:\Windows\SysWOW64.然后重新启动IIS服务并检查phpinfo()。

Only php_oci8.dll should be enabled.

只有php_oci8。dll应该启用。

My Path environment variable contain only PHP path, without instantclient.

我的Path环境变量只包含PHP路径,没有instantclient。

It helped me.

它帮助了我。

更多相关文章

  1. thinkphp环境变量.env配置
  2. 环境变量的安装以及python cahrm的安装以及常用快捷键的使用
  3. 《Linux命令行与shell脚本》笔记--第5章:使用Linux环境变量
  4. Ubuntu系统环境变量详解
  5. Debian下环境变量设置
  6. linux_locale的设定中LANG、LC_ALL、LANGUAGE环境变量的区别
  7. Linux和Windows下查看、设置环境变量的比较
  8. Linux 环境变量与文件查找
  9. 在Linux里设置用户环境变量的方法

随机推荐

  1. 406春天mvc不能接受
  2. 试用资源Android Studio [重复]
  3. Java经典设计模式(1):五大创建型模式(附实例
  4. javaScript里的string的match函数返回值
  5. 【java】线程安全的整型类AtomicInteger
  6. java-I/O File类(4)-DataInputStream和Da
  7. Javascript 事件对象(六)事件默认行为
  8. 毫无废话: 从0开始一点一滴用java开发自
  9. Java中的命名规则
  10. g_ascii_strcasecmp相当于java