oracle 使用 XAMPP 调用未定义的函数 oci_connect()

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41652210/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 03:22:20  来源:igfitidea点击:

Stuck Call to undefined function oci_connect() using XAMPP

phporaclewebxampporacle12c

提问by Maestro Vladimir

i'm want connect PHP to Oracle Database 12c, i'm already try in this video https://www.youtube.com/watch?v=KJme5JMxKeo

我想将 PHP 连接到 Oracle Database 12c,我已经在这个视频中尝试过 https://www.youtube.com/watch?v=KJme5JMxKeo

error message : Call to undefined function oci_connect()

错误消息:调用未定义的函数 oci_connect()

i'm confused why can't connect to ORACLE DATABASE 12c :(

我很困惑为什么无法连接到 ORACLE DATABASE 12c :(

回答by Manyalo

you are very close.

你很亲近。

  1. Add oci.dll, oraociei12.dll, and oraons.dll from C:\instantclient_12_1 to xampp/apache/bin folder. Replace the existing ones.

  2. Restart the Apache

  1. 将 C:\instantclient_12_1 中的 oci.dll、oraociei12.dll 和 oraons.dll 添加到 xampp/apache/bin 文件夹中。替换现有的。

  2. 重启阿帕奇

N.B: Make sure that your PATH environment variable are set to this folder "C:\instantclient_12_1".

注意:确保您的 PATH 环境变量设置为此文件夹“C:\instantclient_12_1”。

回答by Christopher Jones

Check whether command line PHP works. See if there are any log errors. Make sure you have the right OCI8 DLL. Triple check you have 32bit Oracle Instant Client and that it occurs first in PATH. If you have other Oracle libraries installed then your webserver may be finding them first: fix this.

检查命令行 PHP 是否有效。查看是否有任何日志错误。确保您拥有正确的OCI8 DLL。三重检查您是否拥有 32 位 Oracle Instant Client,并且它首先出现在 PATH 中。如果您安装了其他 Oracle 库,那么您的网络服务器可能会首先找到它们:修复此问题。

回答by mustafa-naeem

i have the exact same problem and fix it in the php.ini file by uncommenting this

我有完全相同的问题,并通过取消注释在 php.ini 文件中修复它

extension_dir = "./""remove semicolon"

extension_dir = "./"“删除分号”