PHP 7 RC3: How to install missing MySQL PDO

后端 未结 12 916
暗喜
暗喜 2020-12-04 11:54

I am trying to setup webserver with PHP 7 RC3 + Nginx on Ubuntu 14.04 (for test purposes).

I installed Ubuntu in Vagrant using

12条回答
  •  孤街浪徒
    2020-12-04 12:46

    For thoses running Linux with apache2 you need to install php-mysql

    apt-get install php-mysql
    

    or if you are running ubuntu 16.04 or higher just running the following command will be enought, no need to edit your php.ini file

    apt-get install php7.2-mysql
    

    If you are running ubuntu 15.10 or below:

    Edit your php.ini file, it's located at /etc/php/[version]/apache2/php.ini and search for pdo_mysql you might found something like this

    ;extension=pdo_mysql.so
    

    Change it to this

    extension=pdo_mysql.so
    

    Save the file and restart apache

    service apache2 restart
    

    Check that it's available in your phpinfo()

提交回复
热议问题