Upgraded to bookworm, web interface does not work anymore

Upgraded to bookworm, web interface does not work anymore + pihole -r reports Unsupported OS detected: Debian 12

 pihole -r

  [✓] Root user check

        .;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           'ccll:;ll .oooodc
             .;cll.;;looo:.
                 .. ','.
                .',,,,,,'.
              .',,,,,,,,,,.
            .',,,,,,,,,,,,....
          ....''',,,,,,,'.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'......
            ....',,,,,,,,,,,,.
               .',,,,,,,,,'.
                .',,,,,,'.
                  ..'''.

  [i] SELinux not detected
  [✓] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 8.2.7

  [✓] Checking apt-get for upgraded packages... up to date!

  [i] Checking for / installing Required dependencies for OS Check...
  [✓] Checking for grep
  [✓] Checking for dnsutils

  [✗] Unsupported OS detected: Debian 12
      If you are seeing this message and you do have a supported OS, please contact support.

      https://docs.pi-hole.net/main/prerequisites/#supported-operating-systems

      If you wish to attempt to continue anyway, you can try one of the following commands to skip this check:

      e.g: If you are seeing this message on a fresh install, you can run:
             curl -sSL https://install.pi-hole.net | sudo PIHOLE_SKIP_OS_CHECK=true bash

           If you are seeing this message after having run pihole -up:
             sudo PIHOLE_SKIP_OS_CHECK=true pihole -r
           (In this case, your previous run of pihole -up will have already updated the local repository)

      It is possible that the installation will still fail at this stage due to an unsupported configuration.
      If that is the case, you can feel free to ask the community on Discourse with the Community Help category:
      https://discourse.pi-hole.net/c/bugs-problems-issues/community-help/

Your debug token is: https://tricorder.pi-hole.net/Hb6I47Ht/

upgrade bullseye to bookworm

tried sudo PIHOLE_SKIP_OS_CHECK=true pihole -r
did not help

pihole -a -t
PHP Fatal error: Uncaught Error: Undefined constant "SQLITE3_OPEN_READWRITE" in /var/www/html/admin/scripts/pi-hole/php/teleporter.php:22
Stack trace:
#0 {main}
thrown in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 22

Apparently your PHP installation is missing Sqlite3 module.

What is the output of
ls -al /etc/php/8.2.7/*/conf.d/20-sqlite3.ini
in your system?

Debian 12 is a supported OS. I am running Armbian Bookworm with no issues.

*** [ DIAGNOSING ]: Operating system
[✓] Distro:  Debian
[✓] Version: 12
[✓] dig return code: 0
[i] dig response: "Raspbian=10,11 Ubuntu=20,22,23 Debian=10,11,12 Fedora=36,37,38 CentOS=8,9"
[✓] Distro and version supported

How did you upgrade from Bullseye to Bookworm? In-place upgrade by changing the source list package identifiers, or fresh clean install?

1 Like

I had googled that already, and installed the missing package. But there seems to be no .ini in that place.

ls -al /etc/php/8.2.7/*/conf.d/20-sqlite3.ini
ls: cannot access '/etc/php/8.2.7/*/conf.d/20-sqlite3.ini': No such file or directory

in /etc/php/8.2/mods_available/sqlite3.ini there is

; configuration for php sqlite3 module
; priority=20
extension=sqlite3.so
sudo apt update && apt upgrade -y && apt autoremove -y
sudo sed -i 's/bullseye/bookworm/' /etc/apt/sources.list
sudo sed -i 's/bullseye/bookworm/' /etc/apt/sources.list.d/*.list
sudo sed -i 's|bookworm/updates|bookworm-security|' /etc/apt/sources.list
sudo apt update
sudo apt upgrade --without-new-pkgs -y
sudo apt full-upgrade -y
sudo reboot
sudo apt --purge autoremove -y
sudo apt list --upgradable
sudo apt update && apt upgrade -y && apt autoremove -y
sudo systemctl reboot

In-place upgrades are not always successful.

Debian.org thinks they will be, but their method differs from the one you used.

Raspbian flat out tells you that you are on your own if you go down this path.

This means the module is installed (available), but it doesn't mean it is enabled.

Sorry, the correct path should be /etc/php/8.2/*/conf.d/ (without the .7).

If the module is enabled you will find something like this:
(I changed the command to show pdo_sqlite too)

pi@raspberrypi:/etc/php/8.2 $ ls -al /etc/php/8.2/*/conf.d/*sqlite*.ini
lrwxrwxrwx 1 root root 42 Mar 26 19:43 /etc/php/8.2/cgi/conf.d/20-pdo_sqlite.ini -> /etc/php/8.2/mods-available/pdo_sqlite.ini
lrwxrwxrwx 1 root root 39 Mar 26 19:43 /etc/php/8.2/cgi/conf.d/20-sqlite3.ini    -> /etc/php/8.2/mods-available/sqlite3.ini
lrwxrwxrwx 1 root root 42 Mar 26 19:43 /etc/php/8.2/cli/conf.d/20-pdo_sqlite.ini -> /etc/php/8.2/mods-available/pdo_sqlite.ini
lrwxrwxrwx 1 root root 39 Mar 26 19:43 /etc/php/8.2/cli/conf.d/20-sqlite3.ini    -> /etc/php/8.2/mods-available/sqlite3.ini

My example shows cgi and cli directories, but you should see a similar output (maybe with extra directories for apache and fpm).

If you don't see these symlinks, it means the modules are disabled.

Usually they are enabled on install.
You can try to reinstall the modules, or create the symlinks manually.
Edit: you can also try this.

You need symlinks to sqlite3.ini and pdo_sqlite.ini.

Anyway, you should verify your OS.
As jfb said, In-place upgrades are not always successful. Sometimes a few packages are lost or misconfigured.

This I get

 ls -al /etc/php/8.2/*/conf.d/*sqlite*.ini
lrwxrwxrwx 1 root root 42 Jul 20 18:26 /etc/php/8.2/cli/conf.d/20-pdo_sqlite.ini -> /etc/php/8.2/mods-available/pdo_sqlite.ini
lrwxrwxrwx 1 root root 39 Jul 20 18:26 /etc/php/8.2/cli/conf.d/20-sqlite3.ini -> /etc/php/8.2/mods-available/sqlite3.ini
lrwxrwxrwx 1 root root 42 Jul 20 18:26 /etc/php/8.2/phpdbg/conf.d/20-pdo_sqlite.ini -> /etc/php/8.2/mods-available/pdo_sqlite.ini
lrwxrwxrwx 1 root root 39 Jul 20 18:26 /etc/php/8.2/phpdbg/conf.d/20-sqlite3.ini -> /etc/php/8.2/mods-available/sqlite3.ini

pihole -a -t works again, web interface not

Solved. Since I got pihole -a -t to work again, I took the plunge and reinstalled pi-hole. Working again.

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