无论出于何种原因,PHP7.4.4不希望以路径PHP_mysqli.dll(Windows10服务器版)为目标

无论出于何种原因,PHP7.4.4不希望以路径PHP_mysqli.dll(Windows10服务器版)为目标,php,mysqli,php-7.4,Php,Mysqli,Php 7.4,我通过观看几个关于这个主题的教程,成功地建立了一个PHP服务器。我想开始将数据存储到PHPMyAdmin中。除了一个,一切都好。PHP不希望启用运行PHPMyAdmin所需的mysqli.dll。到目前为止,我已经为PHP.ini文件编写了这段PHP代码 [PHP] ;;;;;;;;;;;;;;;;;;;;;; ; Dynamic Extensions ; ;;;;;;;;;;;;;;;;;;;;;; ; If you wish to have an extension loaded auto

我通过观看几个关于这个主题的教程,成功地建立了一个PHP服务器。我想开始将数据存储到PHPMyAdmin中。除了一个,一切都好。PHP不希望启用运行PHPMyAdmin所需的mysqli.dll。到目前为止,我已经为PHP.ini文件编写了这段PHP代码

[PHP]
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

; If you wish to have an extension loaded automatically, use the following
; syntax:
;
;   extension=modulename
;
; For example:
;
;   extension=mysqli
;
; When the extension library to load is not located in the default extension
; directory, You may specify an absolute path to the library file:
;
;   extension=/path/to/extension/mysqli.so
;
; Note : The syntax used in previous PHP versions ('extension=<ext>.so' and
; 'extension='php_<ext>.dll') is supported for legacy reasons and may be
; deprecated in a future PHP major version. So, when it is possible, please
; move to the new ('extension=<ext>) syntax.
;
; Notes for Windows environments :
;
; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
;   extension folders as well as the separate PECL DLL download (PHP 5+).
;   Be sure to appropriately set the extension_dir directive.
;
;extension=bz2
extension=curl
;extension=ffi
;extension=ftp
;extension=fileinfo
extension=gd2
;extension=gettext
;extension=gmp
extension=intl
;extension=imap
extension=ldap
;extension=mbstring
;extension=exif      ; Must be after mbstring as it depends on it
extension=pdo_mysql
extension=mysqli
;extension=oci8_12c  ; Use with Oracle Database 12c Instant Client
;extension=odbc
;extension=openssl
;extension=pdo_firebird
;extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
;extension=pdo_sqlite
;extension=pgsql
;extension=shmop

; The MIBS data available in the PHP distribution must be installed.
; See http://www.php.net/manual/en/snmp.installation.php
;extension=snmp

;extension=soap
;extension=sockets
;extension=sodium
extension=sqlite3
;extension=tidy
;extension=xmlrpc
;extension=xsl

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

[MySQLi]

; Maximum number of persistent links.  -1 means no limit.
; http://php.net/mysqli.max-persistent
mysqli.max_persistent = -1

; Allow accessing, from PHP's perspective, local files with LOAD DATA statements
; http://php.net/mysqli.allow_local_infile
;mysqli.allow_local_infile = On

; Allow or prevent persistent links.
; http://php.net/mysqli.allow-persistent
mysqli.allow_persistent = On

; Maximum number of links.  -1 means no limit.
; http://php.net/mysqli.max-links
mysqli.max_links = -1

; Default port number for mysqli_connect().  If unset, mysqli_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
; at MYSQL_PORT.
; http://php.net/mysqli.default-port
mysqli.default_port = 3306

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
; http://php.net/mysqli.default-socket
mysqli.default_socket =

; Default host for mysqli_connect() (doesn't apply in safe mode).
; http://php.net/mysqli.default-host
mysqli.default_host =

; Default user for mysqli_connect() (doesn't apply in safe mode).
; http://php.net/mysqli.default-user
mysqli.default_user =

; Default password for mysqli_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
; and reveal this password!  And of course, any users with read access to this
; file will be able to reveal the password as well.
; http://php.net/mysqli.default-pw
mysqli.default_pw =

; Allow or prevent reconnect
mysqli.reconnect = Off

[mysqlnd]
; Enable / Disable collection of general statistics by mysqlnd which can be
; used to tune and monitor MySQL operations.
mysqlnd.collect_statistics = On

; Enable / Disable collection of memory usage statistics by mysqlnd which can be
; used to tune and monitor MySQL operations.
mysqlnd.collect_memory_statistics = Off

; Records communication from all extensions using mysqlnd to the specified log
; file.
; http://php.net/mysqlnd.debug
;mysqlnd.debug =

; Defines which queries will be logged.
;mysqlnd.log_mask = 0

; Default size of the mysqlnd memory pool, which is used by result sets.
;mysqlnd.mempool_default_size = 16000

; Size of a pre-allocated buffer used when sending commands to MySQL in bytes.
;mysqlnd.net_cmd_buffer_size = 2048

; Size of a pre-allocated buffer used for reading data sent by the server in
; bytes.
;mysqlnd.net_read_buffer_size = 32768

; Timeout for network requests in seconds.
;mysqlnd.net_read_timeout = 31536000

; SHA-256 Authentication Plugin related. File with the MySQL server public RSA
; key.
;mysqlnd.sha256_server_public_key =

[PHP]
;;;;;;;;;;;;;;;;;;;;;;
; 动态扩展;
;;;;;;;;;;;;;;;;;;;;;;
; 如果希望自动加载扩展,请使用以下命令
; 语法:
;
;   扩展名=模块名
;
; 例如:
;
;   扩展名=mysqli
;
; 当要加载的扩展库不在默认扩展中时
; 目录,您可以指定库文件的绝对路径:
;
;   extension=/path/to/extension/mysqli.so
;
; 注意:在以前的PHP版本中使用的语法('extension=.so'和
“extension='php..dll')因遗留原因而受支持,可能是
; 在未来的PHP主要版本中已弃用。所以,如果可能的话,请
; 移动到新的('extension=)语法。
;
; Windows环境的注意事项:
;
; - 许多DLL文件位于extensions/(PHP4)或ext/(PHP5+)中
;   扩展文件夹以及单独的PECL DLL下载(PHP5+)。
;   确保正确设置extension\u dir指令。
;
;分机=bz2
扩展=卷曲
;扩展=ffi
;扩展名=ftp
;扩展名=fileinfo
扩展名=gd2
;extension=gettext
;扩展=gmp
扩展名=intl
;扩展名=imap
extension=ldap
;扩展名=mbstring
;扩展=exif;必须在mbstring之后,因为它依赖于它
扩展名=pdo_mysql
扩展名=mysqli
;扩展=oci8_12c;与Oracle数据库12c即时客户端一起使用
;扩展名=odbc
;扩展=openssl
;扩展名=pdo_firebird
;扩展名=pdo_mysql
;扩展=pdo_oci
;扩展名=pdo_odbc
;扩展名=pdo_pgsql
;扩展=pdo_sqlite
;扩展名=pgsql
;扩展名=shmop
; 必须安装PHP发行版中可用的MIBS数据。
; 看见http://www.php.net/manual/en/snmp.installation.php
;扩展名=snmp
;扩展=soap
;扩展=插座
;扩展=钠
扩展名=sqlite3
;扩展=整洁
;扩展名=xmlrpc
;扩展名=xsl
;;;;;;;;;;;;;;;;;;;
; 模块设置;
;;;;;;;;;;;;;;;;;;;
[MySQLi]
; 永久链接的最大数量-1意味着没有限制。
; http://php.net/mysqli.max-persistent
mysqli.max_persistent=-1
; 从PHP的角度来看,允许使用LOAD DATA语句访问本地文件
; http://php.net/mysqli.allow_local_infile
;mysqli.allow_local_infle=On
; 允许或防止持久链接。
; http://php.net/mysqli.allow-persistent
mysqli.allow_persistent=On
; 最大链接数-1意味着没有限制。
; http://php.net/mysqli.max-links
mysqli.max_links=-1
; mysqli_connect()的默认端口号。如果未设置,mysqli_connect()将使用
; $MYSQL\u TCP\u端口或/etc/services或
; 编译时值定义MYSQL\ U端口(按该顺序)。Win32将只显示
; 在MYSQL\u端口。
; http://php.net/mysqli.default-port
mysqli.default_port=3306
; 本地MySQL连接的默认套接字名称。如果为空,则使用内置
; MySQL默认值。
; http://php.net/mysqli.default-socket
mysqli.default\u套接字=
; mysqli_connect()的默认主机(在安全模式下不适用)。
; http://php.net/mysqli.default-host
mysqli.default\u主机=
; mysqli_connect()的默认用户(在安全模式下不适用)。
; http://php.net/mysqli.default-user
mysqli.default\u用户=
; mysqli_connect()的默认密码(在安全模式下不适用)。
; 请注意,在该文件中存储密码通常是一个“坏”主意。
; *任何具有PHP访问权限的*用户都可以运行“echo get\u cfg\u var”(“mysqli.default\u pw”)
; 并显示此密码!当然,任何有读权限的用户
; 文件也将能够显示密码。
; http://php.net/mysqli.default-pw
mysqli.default_pw=
; 允许或阻止重新连接
mysqli.reconnect=Off
[mysqlnd]
; 启用/禁用mysqlnd收集的常规统计信息,可以
; 用于优化和监视MySQL操作。
mysqlnd.collect_statistics=On
; 启用/禁用mysqlnd收集内存使用统计信息,可以
; 用于优化和监视MySQL操作。
mysqlnd.collect\u memory\u statistics=Off
; 使用mysqlnd记录所有扩展到指定日志的通信
; 文件
; http://php.net/mysqlnd.debug
;mysqlnd.debug=
; 定义将记录哪些查询。
;mysqlnd.log_mask=0
; 结果集使用的mysqlnd内存池的默认大小。
;mysqlnd.mempool\u默认值\u大小=16000
; 向MySQL发送命令时使用的预分配缓冲区大小(字节)。
;mysqlnd.net\u cmd\u buffer\u size=2048
; 用于读取中服务器发送的数据的预分配缓冲区的大小
; 字节。
;mysqlnd.net_read_buffer_size=32768
; 网络请求超时(秒)。
;mysqlnd.net_读取_超时=31536000
; SHA-256认证插件相关。MySQL服务器公共RSA的文件
; 钥匙
;mysqlnd.sha256_服务器_公钥=
奇怪的是,路径似乎指向正确的目录和文件,但PHP控制台告诉我它找不到DLL文件。 我也试过这个.php文档,它还说没有加载

    <?php if (!function_exists('mysqli_init') && !extension_loaded('mysqli')) {
    echo 'We don\'t have mysqli!!!';
} else {
    echo 'Phew we have it!';
}
?>


最终我安装了x86版本的PHP并成功启用了模块。我仍然不知道为什么x64版本的PHP不愿意合作。无论如何,问题解决了,耶

结果是我安装了x86版本的PHP并成功地启用了该模块。我仍然不知道为什么x64版本的PHP不愿意合作。无论如何,问题解决了,耶

我使用windows10,发现了与您相同的问题

我尝试将这一行放在php.ini文件中 那就是和我一起工作。您可以更改路径以匹配本地url


extension\u dir=“C:\php7\ext”

我使用windows10时发现了与您相同的问题

我尝试将这一行放在php.ini文件中 那就是我的工作