Module pdo_mysql ini file doesn't exist under /etc/php/7.0/mods-available

六月ゝ 毕业季﹏ 提交于 2019-12-24 01:52:59

问题


I recently upgraded to PHP7, now I learned to find out out while connecting to Laravel, with this problem [PDOException] could not find driver.How am I going to configure or install it? Thank you very much.


回答1:


Here is a solution:

sudo apt-get install php7.0-mysql
sudo phpenmod pdo_mysql
sudo service apache2 restart



回答2:


Following steps are working for me

Installing php7.0-mysql

sudo apt-get install php7.0-mysql

You will then need to ensure the module is enabled:

sudo phpenmod pdo_mysql

Then restart Apache to load the new modules:

sudo service apache2 restart


来源:https://stackoverflow.com/questions/42640722/module-pdo-mysql-ini-file-doesnt-exist-under-etc-php-7-0-mods-available

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!