Tag Archives: Fatal error: Uncaught Error: Class “SQLite3” not found in C:\Code\phpcode\phpbk\tt.php:2 Stack trace: #0 {main} thrown in C:\Code\phpcode\phpbk\tt.php on line 2

Fatal error: Uncaught Error: Class “SQLite3” not found in C:\Code\phpcode\phpbk\tt.php:2 Stack trace: #0 {main} thrown in C:\Code\phpcode\phpbk\tt.php on line 2

PHP link SQLite database connection error

Fatal error: Uncaught Error: Class “SQLite3” not found in

C:\Code\phpcode\phpbk\tt.php:2 Stack trace: #0 {main} thrown in

C:\Code\phpcode\phpbk\tt.php on line 2

 

Error message:

 

 

 

Check whether the path of PHP directory is added to the environment variable:

Example: C:/temp/LAN/PHP

 

Check whether PHP extension to SQLite database is enabled:

Edit C: \ develop \ cluster \ PHP   Php.ini under

 

 

 

 

 

 

The extension file is in C: \ develop \ cluster \ PHP \ ext

Find this line in the php.ini file and change it to the path where ext is located. Let it find the location of the extension file. Pay attention to the writing of slash

 

 

Restart Apache service after modification

 

Refer to official documents:

https://www.php.net/manual/zh/faq.installation.php#faq.installation.addtopath