Browsing the FTL database

If you want to look @ the content of the pihole-FTL database, this may be an option. It requires only two (2) additional files in /var/www/html (tested on pihole v4.0)

  • download Stable version phpLiteAdmin
  • extract the zip file
  • copy phpliteadmin.config.sample.php and phpliteadmin.php into /var/www/html
  • rename phpliteadmin.config.sample.php to phpliteadmin.config.php
  • edit phpliteadmin.config.php:
    change: $directory = '.'; to $directory = '/etc/pihole';
    change: $subdirectories = false; to $subdirectories = true;

browse to http://IP address of pihole/phpliteadmin.php

Inspired by this topic, you can use the search function to list the entries for a specific client, and of course, use any valid sql query you want.

Use @ your own risk...

here is a script that installs everything


# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
  echo "This script must be run as root" 1>&2
  exit 1
mkdir -p phpLiteAdmin
cd phpLiteAdmin
unzip $file

sudo mv /home/pi/phpLiteAdmin/$file /var/www/html/$file
sudo mv /home/pi/phpLiteAdmin/$source /var/www/html/$target

sudo sed -i "/$directory = '.';/c\$directory = '/etc/pihole';" /var/www/html/$target
sudo sed -i '/$subdirectories = false;/c\$subdirectories = true;' /var/www/html/$target



While I was configuring lighttpd to use TMPFS, I noticed some error messages in /var/log/lighttpd/error.log:

(mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  file_get_contents(/etc/pihole/ failed to open stream: Permission denied in /var/www/html/phpliteadmin.php on line 769

Here is a notepad++ screenshot, with the modifications, left side is the result from the original post, right side is the corrected version, that eliminates the errors.
The downside of eliminating the errors: If pihole introduces a new database, you will NOT see it unless you update the database array.