我已经在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。来源:stack overflow
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。