• <bdo id='kRCOV'></bdo><ul id='kRCOV'></ul>

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

      <tfoot id='kRCOV'></tfoot>

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

        致命错误:在将 PHP 5.4.22 和 MySQL 5.5 与 Apache 2.4.7

        时间:2023-07-30
              <tbody id='eS3LE'></tbody>
            <i id='eS3LE'><tr id='eS3LE'><dt id='eS3LE'><q id='eS3LE'><span id='eS3LE'><b id='eS3LE'><form id='eS3LE'><ins id='eS3LE'></ins><ul id='eS3LE'></ul><sub id='eS3LE'></sub></form><legend id='eS3LE'></legend><bdo id='eS3LE'><pre id='eS3LE'><center id='eS3LE'></center></pre></bdo></b><th id='eS3LE'></th></span></q></dt></tr></i><div id='eS3LE'><tfoot id='eS3LE'></tfoot><dl id='eS3LE'><fieldset id='eS3LE'></fieldset></dl></div>

            <tfoot id='eS3LE'></tfoot>

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

                • <bdo id='eS3LE'></bdo><ul id='eS3LE'></ul>

                • <legend id='eS3LE'><style id='eS3LE'><dir id='eS3LE'><q id='eS3LE'></q></dir></style></legend>
                  本文介绍了致命错误:在将 PHP 5.4.22 和 MySQL 5.5 与 Apache 2.4.7 连接时调用未定义的函数 mysqli_connect() in...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试使用 Apache 2.4.7 作为 Web 服务器连接 PHP 5.4.22 和 MySQL 5.5.所有这三个单独工作正常.但是,当我尝试将 PHP 与 MySQL 连接时,出现错误:

                  I am trying to connect PHP 5.4.22 and MySQL 5.5 with Apache 2.4.7 as the web server. All three of these individually are working fine. However, when I try to connect PHP with MySQL I get the error:

                  致命错误:调用未定义的函数 mysqli_connect() in..."

                  "Fatal error: Call to undefined function mysqli_connect() in..."

                  db_connect.php 代码

                  $con = mysqli_connect("localhost","root","root","mylab_dev");
                  
                  if (mysqli_connect_errno($con))
                  {
                      echo "Failed to connect to MySQL: " . mysqli_connect_error();
                  }
                  
                  $conn->close();
                  

                  httpd.conf 配置:

                  ServerRoot "c:/Apache24"
                  
                  #Listen 12.34.56.78:80
                  Listen 80
                  
                  LoadModule php5_module "C:/php/php5apache2_4.dll" (Verified the existence of the physical file)
                  
                  AddHandler application/x-httpd-php .php
                  
                  DirectoryIndex index.php index.html
                  PHPIniDir c:/php
                  

                  修改php.ini-development文件为php.ini

                  Modified php.ini-development file to php.ini

                  ; extension_dir = "./"
                  
                  ; On windows:
                  
                  extension_dir = "ext"
                  
                  extension=php_mysql.dll  --> Uncommented
                  
                  extension=php_mysqli.dll --> Uncommented
                  

                  相应地设置日期时区

                  我注意到一件事,但不确定这是否是原因,在 phpinfo() 页面中,我看到了 MySQL 信息,但没有看到任何显示 mysqli() 的内容.我应该吗?

                  One thing I noticed but not sure if this is the reason, in the phpinfo() page I see the MySQL information, but I don't see anything which says mysqli(). Should I?

                  推荐答案

                  首先,通过检查 phpinfo() 确保您正在编辑正确的 php.ini代码>.

                  First of all, make sure you are editing the correct php.ini by checking from the phpinfo().

                  我主要为 Windows 用户编写了这些说明:

                  I wrote these instructions mainly for Windows users:

                  编辑您的php.ini.

                  检查变量extension-dir是否设置正确.如果没有,请根据您的操作系统指定正确的路径.

                  Check whether variable extension-dir is set properly. If not, specify the correct path as per your OS.

                  extension_dir = "C:Program Filesphpext"
                  

                  通过删除 ;(分号)取消注释这些行:

                  Un-comment these lines by removing the ; (semi-colon):

                  extension=php_mysql.dll
                  extension=php_mysqli.dll
                  

                  这篇关于致命错误:在将 PHP 5.4.22 和 MySQL 5.5 与 Apache 2.4.7 连接时调用未定义的函数 mysqli_connect() in...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

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

                      <tfoot id='CJ5Bc'></tfoot>
                    1. <small id='CJ5Bc'></small><noframes id='CJ5Bc'>

                      <legend id='CJ5Bc'><style id='CJ5Bc'><dir id='CJ5Bc'><q id='CJ5Bc'></q></dir></style></legend>
                      • <bdo id='CJ5Bc'></bdo><ul id='CJ5Bc'></ul>

                          <tbody id='CJ5Bc'></tbody>