1. <small id='wNT9F'></small><noframes id='wNT9F'>

          <bdo id='wNT9F'></bdo><ul id='wNT9F'></ul>
        <tfoot id='wNT9F'></tfoot>
        <legend id='wNT9F'><style id='wNT9F'><dir id='wNT9F'><q id='wNT9F'></q></dir></style></legend>
        <i id='wNT9F'><tr id='wNT9F'><dt id='wNT9F'><q id='wNT9F'><span id='wNT9F'><b id='wNT9F'><form id='wNT9F'><ins id='wNT9F'></ins><ul id='wNT9F'></ul><sub id='wNT9F'></sub></form><legend id='wNT9F'></legend><bdo id='wNT9F'><pre id='wNT9F'><center id='wNT9F'></center></pre></bdo></b><th id='wNT9F'></th></span></q></dt></tr></i><div id='wNT9F'><tfoot id='wNT9F'></tfoot><dl id='wNT9F'><fieldset id='wNT9F'></fieldset></dl></div>

        调用未定义的函数 oci_connect、php_oci8_11g.dll、windows 10、php5.6.24

        Call to undefined function oci_connect, php_oci8_11g.dll , windows 10, php5.6.24(调用未定义的函数 oci_connect、php_oci8_11g.dll、windows 10、php5.6.24)
          <tbody id='NEtAK'></tbody>
        <legend id='NEtAK'><style id='NEtAK'><dir id='NEtAK'><q id='NEtAK'></q></dir></style></legend>
      2. <small id='NEtAK'></small><noframes id='NEtAK'>

      3. <i id='NEtAK'><tr id='NEtAK'><dt id='NEtAK'><q id='NEtAK'><span id='NEtAK'><b id='NEtAK'><form id='NEtAK'><ins id='NEtAK'></ins><ul id='NEtAK'></ul><sub id='NEtAK'></sub></form><legend id='NEtAK'></legend><bdo id='NEtAK'><pre id='NEtAK'><center id='NEtAK'></center></pre></bdo></b><th id='NEtAK'></th></span></q></dt></tr></i><div id='NEtAK'><tfoot id='NEtAK'></tfoot><dl id='NEtAK'><fieldset id='NEtAK'></fieldset></dl></div>
      4. <tfoot id='NEtAK'></tfoot>
                <bdo id='NEtAK'></bdo><ul id='NEtAK'></ul>

                  本文介绍了调用未定义的函数 oci_connect、php_oci8_11g.dll、windows 10、php5.6.24的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个简单的 php 脚本:

                  I have a simple php script:

                  <?php
                  
                  
                              $DB = '//10.11.201.170:1521/XE';
                              $DB_USER = 'BIOTPL';
                              $DB_PASS = 'biotpl';
                              $DB_CHAR = 'AL32UTF8';
                  
                              $conn = oci_connect($DB_USER, $DB_PASS, $DB, $DB_CHAR);
                              if($conn)
                              {
                                  echo "Successfully connected to Oracle.
                  ";
                                  OCILogoff($c);
                                  //$statement = oci_parse($conn, 'select 1 from dual');
                                  //oci_execute($statement);
                                  //$row = oci_fetch_array($statement, OCI_ASSOC+OCI_RETURN_NULLS);
                              }
                              else
                              {
                                  $err = OCIError();
                                  echo "Connection failed." . $err[text];
                              }  
                  ?>
                  

                  当我运行它时(从浏览器或命令行),我收到错误::

                  When I run it (from a browser or from the command line), I get the error::

                  Call to undefined function oci_connect
                  

                  我使用的是 php 5.6.24 .我已将 php_oci8.dll 和 php_oci8_11g.dll 复制到/ext 文件夹.我有

                  I'm using php 5.6.24 . I have copied php_oci8.dll and php_oci8_11g.dll to /ext folder . I have

                  extension=php_oci8.dll 
                  extension=php_oci8_11g.dll  
                  

                  在我的 php.ini 中我已经安装了 Instant client_11_2 - 尝试了 32 位版本.我有 ORACLE_HOME 和 TNS_ADMIN 环境变量指向即时客户端文件夹 ( C:instantclient_11_2 ).

                  in my php.ini I have installed instant client_11_2 - tried 32 bit version . I have ORACLE_HOME and TNS_ADMIN environment variables pointing at the instant client folder ( C:instantclient_11_2 ).

                  几天来,我花了几个小时尝试不同的事情,但都无济于事.

                  I have spent several hours over several days trying different things to no avail.

                  我已安装 Microsoft Visual C++ 2010 运行时 (x86).这是 OCI8 扩展所需要的.我已经安装了 Microsoft Visual C++ 2012 运行时 (x86).这是 PHP 所必需的.

                  I have Installed Microsoft Visual C++ 2010 Runtime (x86). This is needed for the OCI8 extension. I have Installed Microsoft Visual C++ 2012 Runtime (x86). This is needed for PHP.

                  当我尝试以下命令时:

                  php --ri oci8
                  

                  我有以下错误:

                  PHP Warning:  PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_oci8.dll' - %1 is not a valid Win32 application.
                   in Unknown on line 0
                  
                  Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_oci8.dll' - %1 is not a valid Win32 application.
                   in Unknown on line 0
                  PHP Warning:  PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_oci8_11g.dll' - %1 is not a valid Win32 application.
                   in Unknown on line 0
                  
                  Warning: PHP Startup: Unable to load dynamic library 'C:xamppphpextphp_oci8_11g.dll' - %1 is not a valid Win32 application.
                   in Unknown on line 0
                  Extension 'oci8' not present.
                  

                  如何消除以下错误?

                  Fatal error: Call to undefined function oci_connect() 
                  

                  推荐答案

                  您收到 OCI8 扩展的启动错误,表明您的 php 版本使用了不受支持的 dll.您需要使用正确的一个,对于 PHP 5.6.x,它是其中之一:

                  You are getting startup errors for the OCI8 extension indicating that you are using an unsupported dll for your php version. You need to use the correct one, which - for PHP 5.6.x - is one of these:

                  • http://windows.php.net/downloads/pecl/releases/oci8/2.0.8/

                  您需要选择与您的架构(x86 或 x64)、编译器(vc 9、11、14)和线程安全 (ts) 或非线程安全 (nts) php 版本相匹配的版本,例如如果您在 x86 上运行使用 vc11 编译的线程安全 PHP 5.6.24,则可以使用

                  You need to take the one that matches your architecture (x86 or x64), compiler (vc 9, 11, 14) and thread-safe (ts) or non-thread-safe (nts) php version, e.g. if you are running a thread-safe PHP 5.6.24 compiled with vc11 on an x86, you'd use

                  php_oci8-2.0.8-5.6-ts-vc11-x86.zip
                  -------- ----- --- -- ---- --- ---
                  ^        ^     ^   ^  ^    ^   ^
                  |        |     |   |  |    |   \_____ extension
                  |        |     |   |  |    \_________ architecture
                  |        |     |   |  \______________ compiler
                  |        |     |   \_________________ thread-safety mode
                  |        |     \_____________________ php version
                  |        \___________________________ extension version
                  \____________________________________ extension name
                  

                  如果没有与您的PHP匹配的下载,则它不存在,您需要自己编译.更多信息请访问 http://windows.php.net

                  If there is no download matching your PHP, then it does not exist and you need to compile it yourself. More info at http://windows.php.net

                  附带说明:除上述之外,您一次只能使用一个 oci 扩展名.你得到了(php_oci8.dll 和 php_oci8_11g.dll).确保删除您不需要的那个.

                  On a side note: in addition to the above, you can only use one oci extension at a time. You got both (php_oci8.dll and php_oci8_11g.dll). Make sure to remove the one you don't need.

                  这篇关于调用未定义的函数 oci_connect、php_oci8_11g.dll、windows 10、php5.6.24的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  • <bdo id='ZUFMR'></bdo><ul id='ZUFMR'></ul>

                    <i id='ZUFMR'><tr id='ZUFMR'><dt id='ZUFMR'><q id='ZUFMR'><span id='ZUFMR'><b id='ZUFMR'><form id='ZUFMR'><ins id='ZUFMR'></ins><ul id='ZUFMR'></ul><sub id='ZUFMR'></sub></form><legend id='ZUFMR'></legend><bdo id='ZUFMR'><pre id='ZUFMR'><center id='ZUFMR'></center></pre></bdo></b><th id='ZUFMR'></th></span></q></dt></tr></i><div id='ZUFMR'><tfoot id='ZUFMR'></tfoot><dl id='ZUFMR'><fieldset id='ZUFMR'></fieldset></dl></div>

                        <tbody id='ZUFMR'></tbody>

                        <tfoot id='ZUFMR'></tfoot>
                          • <legend id='ZUFMR'><style id='ZUFMR'><dir id='ZUFMR'><q id='ZUFMR'></q></dir></style></legend>

                            <small id='ZUFMR'></small><noframes id='ZUFMR'>