Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.