Unable to delete single item from whitelist in pihole V5.0

In version 4 of pihole you could manual edit /etc/pihole/whitelist.txt and then pihole -g, like this topic:

How to do that in pihole V5.0 ? I can't find it in the help pages.

In addition to doing this through the web GUI, you can use SQL commands to work directly with the gravity database.

https://docs.pi-hole.net/database/gravity/example/

1 Like

Thank you, groupmanagment --> domains was in my case the solution, i have to study more about SQL commands :slight_smile:

I would add that you can also use phpliteadmin and get easy access to gravity.db. It makes it so much easier.

All you have to do is download the phpliteadmin.php and copy it in the /var/www/html/admin folder and configure the

$directory = '/etc/pihole';

You might also have to install php7.3-mbstring

sudo apt install php7.3-mbstring

Check the version of PHP, ofcourse.

One can also still use the pihole command (per docs)

To remove an item from the whitelist:

pihole -w -d domaintodelete.tld

1 Like

Nice !! but what is the password after the install ? The default password of the main dashboard i have disabled, password of user pi and root doesn't work unfortunatly :frowning:

I only use SSH to install, configure, but in the browser, here http://192.168.178.240/admin/phpliteadmin.php , but what Edward mentiond ask about password

I believe the default password is admin. However, if you go to phpaliteadmin.php file, there is a line:

$password = 

You can set it to whatever you want and then you should be good.
Apologies should have mentioned it earlier.

Edward.

Thanks, indeed the password is admin, but if i log in there is nothing :frowning:
I think it doesn't point to the right database, but i don't understand exactly what to change/configure

There is nothing else to configure as far as I know. The directory setting overrides any database settings. Search for $debug=false and set it to true. It will show any issues with drivers or why it's not able to find any database. For me the mbstring library was missing.

Wth the setting $debug=true i got these error message


I feel sorry but i don't understand what's going on.

edit, btw, my setup is a Pi4 with the latest version of strech with the latest updates and a fresh install of pihole V5.0 last week, nothing else is running.

Hi,

As I mentioned in my first message, you will have to install php7.3-mbstring (assuming your php version is 7.3). This has nothing to with pihole.
sudo apt install php7.3-mbstring

That should fix it.

Edward.

Hey Edward, ofcourse i installed php7.3-mbstring yesterday.

Sorry.
Don't know beyond that. After I installed php7.3-mbstring, this was resolved.
Did you restart the webserver for it to find the php7.3-mbstring?

Maybe just reboot the pi to be safe.

Edward.

I've never used phpliteadmin and after installing it (sudo apt-get install -y phpliteadmin) on Ubuntu 20.04, I can't find a phpliteadmin.php file to copy to /var/www/html/admin. I do have an /etc/phpliteadmin.config.php file. But don't see much else (yes a /etc/php/7.4 directory).

I never installed anything. I just downloaded the file, unzipped it and placed the php file in the admin folder. Hope that helps.

YES !! The reboot did the trick, thanks Edward :ok_hand:

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.