使用 XAMPP 卡住对未定义函数 oci_connect() 的调用

2022-01-14 00:00:00 oracle12c web xampp php oracle

我想将 PHP 连接到 Oracle Database 12c,我已经在此视频中尝试过

  • 解压并粘贴 Instant Client(版本 12.1.0.2.0)

  • 并且已经在这里下载了 php_oci8_12c.dll 文件:

  • 错误信息:调用未定义函数 oci_connect()

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

    解决方案

    你很亲密.

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

    2. 重启 Apache

    注意:确保您的 PATH 环境变量设置为此文件夹C:instantclient_12_1".

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

    • i'm already install xampp v3.2.2 and using PHP 5.6

    • install oracle database 12c : http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

    • test login in SQLPlus

    • unzip and paste Instant Client(Version 12.1.0.2.0) http://www.oracle.com/technetwork/topics/winsoft-085727.html to directory C

    • set path environtment C:instantclient_12_1;

    • uncoment semicolon (;) extension=php_oci8_12c.dll in php.ini

    • and already download php_oci8_12c.dll file in here : http://pecl.php.net/package/oci8/2.0.8/windows

      and already paste to in C:xamppphpext

    • when i test script connect : http://pastebin.com/f1isKKar

    error message : Call to undefined function oci_connect()

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

    解决方案

    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

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

    相关文章