Elana
Elana

Reputation: 41

MAMP and Yosemite PDO Exception Driver Issue

I installed Yosemite and now when I use MAMP I receive this Fatal error:

Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in 
/Applications/MAMP/htdocs/CRUD/pdo.php:3 Stack trace: #0     
/Applications/MAMP/htdocs/CRUD/pdo.php(3): PDO->__construct('mysql:host=loca...', 'fred', 
'zap') #1 /Applications/MAMP/htdocs/CRUD/index.php(2): require_once('/Applications/M...') 
#2 {main} thrown in /Applications/MAMP/htdocs/CRUD/pdo.php on line 3

Any ideas?

Upvotes: 3

Views: 1866

Answers (1)

l3aronsansgland
l3aronsansgland

Reputation: 344

Here is a way to fix it:

  • Start MAMP
  • On the top left, go to "MAMP" -> "Preferences"
  • Go to the "PHP" tab
  • Tick PHP 5.5.17 (or whatever you have) instead of the one which is ticked by default (5.6.1 -> 5.5.17 with he latest version of MAMP)

Upvotes: 3

Related Questions