Issue
I was trying to connect to SQLite database file using PDO but it is showing the following error message.
PHP Fatal error: Uncaught PDOException: could not find driver in ...
Solution
The cause was that the SQLite extension was not activated. To resolve this, I edited php.ini to change
;extension=pdo_sqlite
to
extension=C:\xuan\bin\php-7.3.8-Win32-VC15-x86\ext\php_pdo_sqlite.dll
From phpinfo()
, you should get a section that look like the following.