After a few weeks of working fine, now getting Fatal error: Uncaught Error: Call to a member function fetchArray()... #643
|
Installed BirdNET-Pi a few weeks ago on a Raspberry Pi 3 Model B Plus Rev 1.3 with a USB mic (nothing special), and was very pleased with the results. However, I recently see this on the Overview page- Fatal error: Uncaught Error: Call to a member function fetchArray() on false in .../BirdNET-Pi/scripts/overview.php:304 Stack trace: #0 .../BirdNET-Pi/homepage/views.php(154): include() #1 {main} thrown in .../BirdNET-Pi/scripts/overview.php on line 304 The only change I made recently was to tick the box for the get internet date/time. I see code in the area of the error is related to date, so wondering if this could be the reason. I reverted to manual input, but still getting same error. My PHP and SQL knowledge is non-existent! I found a similar error query in the original mcguire github discussion, tried the suggestions there, but didnt fix it. [EDIT] added a bit of debug code to the overview.php before line 304 to check the $result = $statement->execute(); line, and $result is indeed false. |
Replies: 2 comments 1 reply
|
That stack trace means the prepared statement never ran successfully: In BirdNET-Pi this almost always points at SQLite, not the “internet date/time” checkbox itself (that flag only changes how timestamps are written once the DB is healthy). What to check (in order)
About the date/time toggleReverting it was the right first step, but once If you paste the output of |
|
Fairly certain this was the error I saw when I was out of storage. |
That stack trace means the prepared statement never ran successfully:
$statement->execute()returnedfalse, so$resultis boolean false and callingfetchArray()on it fatals.In BirdNET-Pi this almost always points at SQLite, not the “internet date/time” checkbox itself (that flag only changes how timestamps are written once the DB is healthy).
What to check (in order)
Is the DB file still there and readable?
If the file is missing, zero bytes, or owned by root while PHP runs as
www-data/nginx,