Niels Meulders
Niels Meulders

Reputation: 41

Could not find PDO driver when installing laravel 5 on CentOS 7 with DigitalOcean

I'm trying to get my offline Laravel 5 webapp deployed. First of all I created a new droplet at DigitalOcean. Via ssh access I installed a fully working LAMP stack (I got the apache test-page at my ip-address).

After that, I pulled my git repo into the /var/www/html folder. Using composer install all my dependencies were installed.

When I visit my-ip-addres/public, I get a laravel error

PDOException in Connector.php line 55: could not find driver

I thought maybe my PDO module wasn't installed correctly but when I look in my phpinfo() file, everything looks correct.

Is there anyone who can help me out with this problem?

Upvotes: 4

Views: 1391

Answers (1)

hoseinz3
hoseinz3

Reputation: 638

run this command sudo apt-get install phpX-mysql X: php version (7.0 or 5.6 or ...) and then service apache restart .

Upvotes: 0

Related Questions