I can't get the Network Page to work, I keep getting "Error connecting to database". I have read some other things regarding this error which seems to point to the idea that I don't have SQLite installed but according to PHPInfo I have SQLite version 3.26.0 installed.
Any ideas? I'm running Fedora Server Edition inside a VM. By the way, I'm not exactly familiar with Linux; I know just enough to be dangerous. I'm more of a Windows person, I know... go ahead and laugh if you must.
No need for this. We all start learning new things bottom up!
Please provide the most recent line(s) of /var/log/lighttpd/error.log after you triggered this error on the Network Page. You can get the most recent lines by running, for instance,
[tom@unknown00155d01f100 ~]$ sudo -u lighttpd sqlite3 /etc/pihole/pihole-FTL.db "SELECT COUNT(*) FROM network;"
[sudo] password for tom: (my password goes here)
Error: unable to open database "/etc/pihole/pihole-FTL.db": unable to open database file
[tom@unknown00155d01f100 ~]$ groups lighttpd
lighttpd : lighttpd
This is the issue. The user lighttpd should be member of the group pihole in order to access the database. This should have been done by the installer for you, but apparently something happened to the membership. Please try
sudo usermod -a -G pihole lighttpd
sudo systemctl restart lighttpd
How does the sudo -u lighttpd command output look like?
A user has to re-login after a group membership change. I figured restarting lighttpd would have been enough to do this but if you tried that already, you might need to restart the entire VM...
[tom@unknown00155d01f100 ~]$ sudo -u lighttpd sqlite3 /etc/pihole/pihole-FTL.db "SELECT COUNT(*) FROM network;"
[sudo] password for tom: (my password goes here)
Error: unable to open database "/etc/pihole/pihole-FTL.db": unable to open database file
Uh... no, I didn't. I didn't think I needed to. I thought that if the user had access to the file it would work. I forgot that Linux file permissions are setup like this... user.group.everyone.
See? I'm not very familiar with Linux, I know just enough to be dangerous.