Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP PHP & Databases with PDO Getting Started With PDO Managing Errors

Could not find driver?

So I have the following code: $db = new PDO('sqlite:./database.db'); var_dump($db); die();

Everything should be correct but I get the following error: Uncaught exception 'PDOException' with message 'could not find driver' in /home/treehouse/workspace/index.php:6 Stack trace: #0 /home/treehouse/workspace/index.php(6): PDO->__construct('sqlite:./databa...') #1 {main} thrown in /home/treehouse/workspace/index.php on line 6

What am I missing?

2 Answers

Steven Snary
Steven Snary
17,540 Points

Good Afternoon Ester - I am getting the same thing as you are - I tried using different browsers and the same thing happens.

I'll be watching this question for an answer to it.