Why PDO SQLite not working


Hi There! I can not understand what was going on.

My code:
$db = new PDO(‘sqlite:data.sqlite’);

And I have error log:
PHP Fatal error: Uncaught PDOException: could not find driver in /app/scraper.php:7

Stack trace:

#0 /app/scraper.php(7): PDO->__construct(‘sqlite:data.sql…’)

#1 {main}

thrown in /app/scraper.php on line 7

Help me, please


My guess would be that the SQLite driver is not installed in the morph.io image.

I’d suggest using the ScraperWiki library to save data in PHP. You can find an example of how to do this in the template that you get when you create a new scraper.