Pihole 5 upgrade error : DataTables warning: table id=groupsTable - Ajax error. For more information about this error

my pihole is running from my vps/vpn server,, after upgrading from v4.4 I got this error..I cant add any group/client blacklist/whitelist,,thankss

Please either clear the cache on your browser or force reload the page with ctrl+F5, that should stop the error

hmm same problem.Even trying on my phone browser .

Do you see any errors in

sudo cat /var/log/lighttpd/error.log?

Something is not correct (besides the error) as the status "lights" are all white.

You could also try to restart lighttpd

systemctl restart lighttpd.service

[Wed May 13 11:29:53.194411 2020] [:error] [pid 28101] [client XX.36.62.XXX:13300] PHP Notice:  Use of undefined constant SQLITE3_OPEN_READWRITE - assumed 'SQLITE3_OPEN_READWRITE' in /var/www/html/admin/scripts/pi-hole/php/groups.php on line 24, referer: https://dns.mydomain.xyz/groups.php
[Wed May 13 11:29:53.199639 2020] [:error] [pid 28101] [client XX.36.62.XX:13300] PHP Fatal error:  Class 'SQLite3' not found in /var/www/html/admin/scripts/pi-hole/php/database.php on line 42, referer: https://dns.mydomain.xyz/groups.php


pihole runs with apache2

Do you have php-sqlite3 installed?

sudo apt install php-sqlite3

3 Likes
 PHP Notice:  Use of undefined constant SQLITE3_OPEN_READWRITE - assumed 'SQLITE3_OPEN_READWRITE' in /var/www/html/admin/scripts/pi-hole/php/groups.php on line 24, referer: https://dns.XX.xyz/groups.php
[Wed May 13 11:41:00.476481 2020] [:error] [pid 1747] [client 51.36.62.XX:25594] PHP Fatal error:  Class 'SQLite3' not found in /var/www/html/admin/scripts/pi-hole/php/database.php on line 42, referer: https://dns.XX.xyz/groups.php



I install it and npw with new error logs

Restart lighthttpd

systemctl restart lighttpd.service

:wink:

I know.. but I thought that were logs of /var/log/lighttpd/error.log and apache was installed additionally :wink:

Then restart apache

I restart apache2 but same

for some reason . apache2 is running with diffent group not www-data ..but I already add pihole user to that apache group..Will that cause this error??I dont have any errors when changing setting on settings panel.only in groups/blacklist/whitelist panel

My last idea is

Your apache-user must be part in the pihole group, not vice-versa.
To check for the apache user

apachectl -S

ps aux | egrep '(apache|httpd)'

Otherwise some else (with apache knowledge) has to dig further.
Good luck.

1 Like

I dont have an issue before this upgrade , I just assign pihole user to my apache group before..anyway the first error where missing php5.6 sqlite3 since im using php5.6,,so I install sqlite3 package..but know the error is this

  Error, something went wrong!
While executing: attempt to write a readonly database
Added 0 out of 1 groups

Permissions may now be broken on the database. Try renaming or removing /etc/pihole/gravity.db and allowing pi-hole to create a new one with pihole -g

Thanks I solve this problem with :
chown u+w gravity.db
chown g+w gravity.db

1 Like

Or that!

well after updating gravity.db ,, there's error again, I recheck it and it was back to pihole owner and group..so I chmod it again to my apache group.. :pensive:

Hmm OK, sorry I can't be much more help in this situation. I've never used apache before.

I have seen a couple of apache issues fixed by installing php-sqlite3, but don't take my word for that as I have no way to verify it other than anecdotal evidence.

Perhaps a community member would like to put together a guide for running Pi-hole behind Apache and submit it to our docs repo...

a simple solution is to add apache user to pihole group..as mention previously by yubiuser..and installing php5.6 sqlite3 if they have php 5.6 version..