I have the supposedly simple code below. The intuit is to create a table include values and soon after show the information, but in log apache is showing the following:
[:error] [pid 17622] [client 10.1.21.1:42895] PHP Fatal error: Uncaught Error: Class 'SQLite3' not found in /var/www/html/acesso.php:2\nStack trace:\n#0 {main}\n thrown in /var/www/html/acesso.php on line 2
<?php
$db = new SQLite3('test.db');
$db->exec('CREATE TABLE test (id INT, message STRING)');
$db->exec("INSERT INTO test (id, message) VALUES ('1', 'test message')");
$db->exec("INSERT INTO test (id, message) VALUES ('2', 'test message 2')");
$results = $db->query("SELECT * FROM test WHERE ID = 2");
print_r($results->fetchArray());
?>
PHP Summer: 7.0
OS version: Ubuntu 16.10
Installed Sqlite Version: 3.14.1
Apache Version: Apache / 2.4.18 (Ubuntu)