gpt4 book ai didi

php - 如何在 PHP 7 中启用 MySQLi 扩展?

转载 作者:行者123 更新时间:2023-12-04 19:29:49 25 4
gpt4 key购买 nike

我已经在 Ubuntu 14.04 (Trusty Tahr) 上安装了 PHP 7 和 MySQL 5.5.47。

我已经使用以下方法检查了已安装的扩展:

sudo apt-cache search php7-*

它输出:
php7.0-common - Common files for packages built from the PHP source
libapache2-mod-php7.0 - server-side, HTML-embedded scripting language (Apache 2 module)
php7.0-cgi - server-side, HTML-embedded scripting language (CGI binary)
php7.0-cli - command-line interpreter for the PHP scripting language
php7.0-phpdbg - server-side, HTML-embedded scripting language (PHPDBG binary)
php7.0-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)
libphp7.0-embed - HTML-embedded scripting language (Embedded SAPI library)
php7.0-dev - Files for PHP7.0 module development
php7.0-dbg - Debug symbols for PHP7.0
php7.0-curl - CURL module for PHP
php7.0-enchant - Enchant module for PHP
php7.0-gd - GD module for PHP
php7.0-gmp - GMP module for PHP
php7.0-imap - IMAP module for PHP
php7.0-interbase - Interbase module for PHP
php7.0-intl - Internationalisation module for PHP
php7.0-ldap - LDAP module for PHP
php7.0-mcrypt - libmcrypt module for PHP
php7.0-readline - readline module for PHP
php7.0-odbc - ODBC module for PHP
php7.0-pgsql - PostgreSQL module for PHP
php7.0-pspell - pspell module for PHP
php7.0-recode - recode module for PHP
php7.0-snmp - SNMP module for PHP
php7.0-tidy - tidy module for PHP
php7.0-xmlrpc - XMLRPC-EPI module for PHP
php7.0-xsl - XSL module for PHP
php7.0 - server-side, HTML-embedded scripting language (metapackage)
php7.0-json - JSON module for PHP
php-all-dev - package depending on all supported PHP development packages
php7.0-sybase - Sybase module for PHP
php7.0-sqlite3 - SQLite3 module for PHP
php7.0-mysql - MySQL module for PHP
php7.0-opcache - Zend OpCache module for PHP
php7.0-bz2 - bzip2 module for PHP

我也无法使用 phpinfo() 看到 MySQLi 扩展。如何在 PHP 7 中启用/安装 MySQLi 扩展?

这就是为什么我不能使用 phpMyAdmin。它说“缺少 mysqli 扩展。”

最佳答案

问题是用于将 PHP 连接到 MySQL 的包已被弃用(php5-mysql)。如果您安装新软件包,

sudo apt-get install php-mysql

这将自动更新 Apache 和 PHP 7。

关于php - 如何在 PHP 7 中启用 MySQLi 扩展?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67730469/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com