I am trying to get data out of the domoticz.db with sqlite3 and php. For some reason I cannot get it to work.
what i do in PHP is:
Code: Select all
$dbname = "/home/name_user/domoticz/domoticz.db";
if($db = new SQLite3($dbname)) {
echo("<br>Link met DB succes");
}
$res = $db->query("select * from zwavenodes"); //simple Q as example
while ($rij = $res->fetchArray()) {
echo($rij[4]);
echo("<br>");
}
The error log of nginx says it is unable to open the database file, but refers to the line where I 'fire' the query, not the line in which I try to open the DB. Opening the DB does not return FALSE...
Am I missing something?
Thanks, Tim