Reputation: 27
I install laravel 5 and then install packages neede.
I install php-pdo and some other but now i cant install pdo-mysql and laravel return error.
PDOException in PDOConnection.php line 47: could not find driver
I am use Centos 7 and PHP 5-6-29.
Upvotes: 2
Views: 38934
Reputation: 1429
Try using this
yum install php-mysql
systemctl restart httpd
Upvotes: 4
Reputation: 443
You can search package like
yum search php
Pick the ones you need and install them like this:
yum -y install php-mysqlnd php-pdo
In the next step I will install some common PHP modules that are required by CMS Systems like Wordpress, Joomla, and Drupal:
yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-soap curl curl-devel
Upvotes: 4
Reputation: 7031
Check which package is installed (which provider) and provides the stack, then use the same namespace.
As you need pdo_mysql driver, simply
yum install <namespace>-pdo_mysql
(using the ext name, yum will find the correct package name which provides this ext).
Also check you don't have any "exclude" lines in the yum configuration (such as the ones provided in altered cpanel distributions)
Upvotes: 8
Reputation: 381
https://webtatic.com/packages/php56/
I believe the driver is php56w-mysql so yum install php56w-mysql
should do the job.
Upvotes: 1