问题描述
我正在尝试在 Ubuntu 14.04
上使用 PHP 7 RC3
+ Nginx
设置网络服务器(用于测试目的).
I am trying to setup webserver with PHP 7 RC3
+ Nginx
on Ubuntu 14.04
(for test purposes).
我使用 ubuntu/trusty64
和来自 Ondřej Surý 的 PHP 7 RC 3 (https://launchpad.net/~ondrej/+archive/ubuntu/php-7.0).
I installed Ubuntu in Vagrant using ubuntu/trusty64
and PHP 7 RC 3 from Ondřej Surý (https://launchpad.net/~ondrej/+archive/ubuntu/php-7.0).
我找不到安装 MySQL PDO
的方法(PHP 看到 PDO
类但没有任何与 MySQL 相关的东西,比如 PDO::MYSQL_ATTR_DIRECT_QUERY
> 等)
I can not find the way to install MySQL PDO
(PHP sees PDO
class but not anything related to MySQL, like PDO::MYSQL_ATTR_DIRECT_QUERY
etc.)
看起来没有lib php7.0-mysql
(类比标准php5-mysqlnd
和php7.0-fpm
等. 来自 Ondřej)
Looks like there is no lib php7.0-mysql
(by analogy with standard php5-mysqlnd
and php7.0-fpm
etc. from Ondřej)
phpinfo()
中的 PDO
部分:
PDO support enabled
PDO drivers no value
我怎样才能得到它?
推荐答案
由于 eggyal 没有提供他的评论作为他在评论中给出了正确的建议后回答 - 我在这里发布:在我的情况下,我必须安装模块 php-mysql
.详情请参阅问题下方的评论.
Since eggyal didn't provided his comment as answer after he gave right advice in a comment - i am posting it here: In my case I had to install module php-mysql
. See comments under the question for details.
这篇关于PHP 7 RC3:如何安装缺少的 MySQL PDO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!