Updating DietPi has broken Nextcloud installation

root@DietPi:~# ls -la /usr/share/lighttpd/
total 28
drwxr-xr-x  2 root root 4096 Nov  6 15:10 .
drwxr-xr-x 89 root root 4096 Nov  6 16:07 ..
-rwxr-xr-x  1 root root 6139 Jan 27  2019 create-mime.conf.pl
-rwxr-xr-x  1 root root  462 Sep 27  2019 include-conf-enabled.pl
-rw-r--r--  1 root root 3388 Sep 27  2019 index.html
-rwxr-xr-x  1 root root  247 Sep 18  2020 use-ipv6.pl

ok let’s try following

sed -i 's/create-mime\.assign\.pl/create-mime.conf.pl/g' /etc/lighttpd/lighttpd.conf
systemctl restart lighttpd.service

OK - that’s got lighthttpd running again and I can hit the placeholder page. Great - thanks!

So, I think we’re at the point you wanted to get to (which was to get the base distro upgraded to Buster) and then, if I recall, it was PHP next because if I try the /nextcloud page I get the internal server error message which started off this whole conversation.

let’s check what version is installed

dpkg -l | grep 'php'
root@DietPi:~# dpkg -l | grep 'php'
ii  libapache2-mod-php8.0         8.0.10-1+0~20210826.23+debian9~1.gbp9ab3fd                              armhf        server-side, HTML-embedded scripting language (Apache 2 module)
ii  php                           2:8.0+84+0~20210621.36+debian9~1.gbp28513e                              all          server-side, HTML-embedded scripting language (default)
ii  php-apcu                      5.1.20+4.0.11-1+0~20210304.24+debian9~1.gbp1c3d4d                       armhf        APC User Cache for PHP
ii  php-common                    2:84+0~20210621.36+debian9~1.gbp28513e                                  all          Common files for PHP packages
ii  php-igbinary                  3.2.6+2.0.8-1+0~20210913.27+debian9~1.gbp64b0ea                         armhf        igbinary PHP serializer
ii  php-mysql                     2:8.0+84+0~20210621.36+debian9~1.gbp28513e                              all          MySQL module for PHP [default]
ii  php-pear                      1:1.10.12+submodules+notgz+20210212-1+0~20210228.21+debian9~1.gbpf2b98f all          PEAR Base System
ii  php-php-gettext               1.0.12-0.1                                                              all          read gettext MO files directly, without requiring anything other than PHP
ii  php-phpseclib                 2.0.14-1                                                                all          implementations of an arbitrary-precision integer arithmetic library
ii  php-redis                     5.3.4+4.3.0-1+0~20210329.35+debian9~1.gbpdc7ead                         armhf        PHP extension for interfacing with Redis
ii  php7.3-cli                    7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        command-line interpreter for the PHP scripting language
ii  php7.3-common                 7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        documentation, examples and common module for PHP
rc  php7.3-curl                   7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        CURL module for PHP
ii  php7.3-fpm                    7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        server-side, HTML-embedded scripting language (FPM-CGI binary)
ii  php7.3-gd                     7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        GD module for PHP
ii  php7.3-intl                   7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        Internationalisation module for PHP
ii  php7.3-json                   7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        JSON module for PHP
ii  php7.3-mbstring               7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        MBSTRING module for PHP
ii  php7.3-mysql                  7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        MySQL module for PHP
ii  php7.3-opcache                7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        Zend OpCache module for PHP
ii  php7.3-readline               7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        readline module for PHP
ii  php7.3-xml                    7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ii  php7.3-zip                    7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        Zip module for PHP
ii  php8.0                        8.0.11-1+0~20210923.24+debian9~1.gbp50d5dd                              all          server-side, HTML-embedded scripting language (metapackage)
ii  php8.0-apcu                   5.1.20+4.0.11-1+0~20210304.24+debian9~1.gbp1c3d4d                       armhf        APC User Cache for PHP
ii  php8.0-cli                    8.0.10-1+0~20210826.23+debian9~1.gbp9ab3fd                              armhf        command-line interpreter for the PHP scripting language
ii  php8.0-common                 8.0.10-1+0~20210826.23+debian9~1.gbp9ab3fd                              armhf        documentation, examples and common module for PHP
ii  php8.0-igbinary               3.2.6+2.0.8-1+0~20210913.27+debian9~1.gbp64b0ea                         armhf        igbinary PHP serializer
ii  php8.0-mysql                  8.0.10-1+0~20210826.23+debian9~1.gbp9ab3fd                              armhf        MySQL module for PHP
ii  php8.0-opcache                8.0.10-1+0~20210826.23+debian9~1.gbp9ab3fd                              armhf        Zend OpCache module for PHP
ii  php8.0-readline               8.0.10-1+0~20210826.23+debian9~1.gbp9ab3fd                              armhf        readline module for PHP
ii  php8.0-redis                  5.3.4+4.3.0-1+0~20210329.35+debian9~1.gbpdc7ead                         armhf        PHP extension for interfacing with Redis
ii  phpmyadmin                    4:4.6.6-5                                                               all          MySQL web administration tool

try following

apt purge '*php8.0*'
apt install php7.3-apcu php7.3-redis

Thanks again for your continued support on this.

I have run the commands and, as a precaution, rebooted the Pi. This appears to have killed lighthttpd again -

 DietPi-Services
âââââââââââââââââââââââââââââââââââââââââââââââââââââ
 Mode: status

[  OK  ] DietPi-Services | redis-server         active (running) since Sun 2021-11-07 17:42:59 GMT; 58s ago
[  OK  ] DietPi-Services | mariadb              active (running) since Sun 2021-11-07 17:43:01 GMT; 56s ago
[  OK  ] DietPi-Services | php7.3-fpm           active (running) since Sun 2021-11-07 17:43:02 GMT; 54s ago
[FAILED] DietPi-Services | â lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-11-07 17:43:06 GMT; 51s ago
  Process: 765 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)

Nov 07 17:43:06 DietPi systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Nov 07 17:43:06 DietPi systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
Nov 07 17:43:06 DietPi systemd[1]: Stopped Lighttpd Daemon.
Nov 07 17:43:06 DietPi systemd[1]: lighttpd.service: Start request repeated too quickly.
Nov 07 17:43:06 DietPi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Nov 07 17:43:06 DietPi systemd[1]: Failed to start Lighttpd Daemon.
[  OK  ] DietPi-Services | cron                 active (running) since Sun 2021-11-07 17:43:03 GMT; 54s ago
[  OK  ] DietPi-Services | ssh                  active (running) since Sun 2021-11-07 17:42:58 GMT; 59s ago
[ INFO ] DietPi-Services | dietpi-vpn           inactive (dead)
[  OK  ] DietPi-Services | dietpi-ramlog        active (exited) since Sun 2021-11-07 17:42:47 GMT; 1min 10s ago
[  OK  ] DietPi-Services | dietpi-preboot       active (exited) since Sun 2021-11-07 17:42:47 GMT; 1min 10s ago
Warning: The unit file, source configuration file or drop-ins of dietpi-postboot.service changed on disk. Run 'systemctl daemon-reload' to reload units.
[  OK  ] DietPi-Services | dietpi-postboot      active (exited) since Sun 2021-11-07 17:42:58 GMT; 59s ago
[ INFO ] DietPi-Services | dietpi-wifi-monitor  inactive (dead)

Though it looks like php 7.3 has installed and is running.

Pls share

/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf

Happy to. Still very grateful for your continued assistance -

/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf

WARNING: include-conf-enabled.pl is deprecated and slated for removal.
         Replace in lighttpd.conf with:
           include "/etc/lighttpd/conf-enabled/*.conf"

2021-11-08 09:55:11: (configfile.c.1328) opening configfile  /etc/lighttpd/conf-enabled/50-phpmyadmin.conf failed: No such file or directory
2021-11-08 09:55:11: (configfile.c.1296) source: /usr/share/lighttpd/include-conf-enabled.pl line: 7 pos: 8 parser failed somehow near here: (EOL)
2021-11-08 09:55:11: (configfile.c.1296) source: /etc/lighttpd/lighttpd.conf line: 32 pos: 1 parser failed somehow near here: (EOL)

ah phpMyAdmin has been removed as well. Therefore config would need to be disabled

rm /etc/lighttpd/conf-enabled/50-phpmyadmin.conf
systemctl restart lighttpd.service

Hi -

OK - done that. Web service now running again, and I am able to hit the root placeholder page.

When trying the /nextcloud URL I now have something new. Instead of the generic “Internal server error” message I had been seeing previously, the system is now displaying a Nextcloud look-and-feel web page (logo, etc…) but with the following displayed in the middle of the page which I think was what you were originally working towards in respect of getting a response and then helping me to fix PHP -

Error

PHP module cURL not installed.
Please ask your server administrator to install the module.
PHP modules have been installed, but they are still listed as missing?
Please ask your server administrator to restart the web server.

let’s see if we can install the required module

apt update
apt install php7.3-curl
dietpi-services restart

Thanks (again)

It was looking encouraging and then this popped up when I attempted to install the following came up -

apt install php7.3-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.3-curl : Depends: php7.3-common (= 7.3.31-1~deb10u1) but 7.3.31-1+0~20210923.88+debian9~1.gbpac4058 is to be installed
E: Unable to correct problems, you have held broken packages.

Thought I’d use some initiative and try

apt install php7.3-common

, but it reports that this module is already at the newest version (7.3.31-1+0~20210923.88+debian9~1.gbpac4058).

The key seems to be in these held broken packages.

Ah it’s still the incorrect package from stretch. Let’s check what is installed

dpkg -l | grep 'php'

Output of the command -

 dpkg -l | grep 'php'
ic  libapache2-mod-php8.0         8.0.10-1+0~20210826.23+debian9~1.gbp9ab3fd                              armhf        server-side, HTML-embedded scripting language (Apache 2 module)
ii  php-apcu                      5.1.17+4.0.11-1                                                         armhf        APC User Cache for PHP
ii  php-common                    2:84+0~20210621.36+debian9~1.gbp28513e                                  all          Common files for PHP packages
ii  php-igbinary                  3.0.0-1                                                                 armhf        igbinary PHP serializer
ii  php-pear                      1:1.10.12+submodules+notgz+20210212-1+0~20210228.21+debian9~1.gbpf2b98f all          PEAR Base System
ii  php-php-gettext               1.0.12-0.1                                                              all          read gettext MO files directly, without requiring anything other than PHP
ii  php-phpseclib                 2.0.14-1                                                                all          implementations of an arbitrary-precision integer arithmetic library
ii  php-redis                     4.2.0-1                                                                 armhf        PHP extension for interfacing with Redis
ii  php7.3-cli                    7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        command-line interpreter for the PHP scripting language
ii  php7.3-common                 7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        documentation, examples and common module for PHP
rc  php7.3-curl                   7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        CURL module for PHP
ii  php7.3-fpm                    7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        server-side, HTML-embedded scripting language (FPM-CGI binary)
ii  php7.3-gd                     7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        GD module for PHP
ii  php7.3-intl                   7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        Internationalisation module for PHP
ii  php7.3-json                   7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        JSON module for PHP
ii  php7.3-mbstring               7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        MBSTRING module for PHP
ii  php7.3-mysql                  7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        MySQL module for PHP
ii  php7.3-opcache                7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        Zend OpCache module for PHP
ii  php7.3-readline               7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        readline module for PHP
ii  php7.3-xml                    7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ii  php7.3-zip                    7.3.31-1+0~20210923.88+debian9~1.gbpac4058                              armhf        Zip module for PHP
ic  php8.0-apcu                   5.1.20+4.0.11-1+0~20210304.24+debian9~1.gbp1c3d4d                       armhf        APC User Cache for PHP
ic  php8.0-cli                    8.0.10-1+0~20210826.23+debian9~1.gbp9ab3fd                              armhf        command-line interpreter for the PHP scripting language
ic  php8.0-common                 8.0.10-1+0~20210826.23+debian9~1.gbp9ab3fd                              armhf        documentation, examples and common module for PHP
ic  php8.0-igbinary               3.2.6+2.0.8-1+0~20210913.27+debian9~1.gbp64b0ea                         armhf        igbinary PHP serializer
ic  php8.0-mysql                  8.0.10-1+0~20210826.23+debian9~1.gbp9ab3fd                              armhf        MySQL module for PHP
ic  php8.0-opcache                8.0.10-1+0~20210826.23+debian9~1.gbp9ab3fd                              armhf        Zend OpCache module for PHP
ic  php8.0-readline               8.0.10-1+0~20210826.23+debian9~1.gbp9ab3fd                              armhf        readline module for PHP
ic  php8.0-redis                  5.3.4+4.3.0-1+0~20210329.35+debian9~1.gbpdc7ead                         armhf        PHP extension for interfacing with Redis
rc  phpmyadmin                    4:4.6.6-5                                                               all          MySQL web administration tool

let me ping our developer MichaIng to get this sorted and cleaned up. Still some old packages.

Many thanks - I’ll keep an eye open for the next update :slight_smile:

So the issue is that PHP module packages depend on an exact version of php-common and hence when Ondrej’s repository is removed, no new module can be installed. php-common also cannot be downgraded as long as any module from Ondrej’s repo is installed.

Yeah looks like all of them need to be downgraded to the Debian Buster packages then.

First of all purge the remaining PHP8.0 packages:

G_AGP '*php8.0*'

There are also config files from phpMyAdmin left. If you don’t use it, purge it as well:

G_AGP phpmyadmin

If you want to use it, I suggest to install it via dietpi-software after the PHP module reinstalls below, which will pull the latest upstream version of phpMyAdmin, instead of the Debian package.

Then try to reinstall + downgrade all PHP (7.3) packages this way:

apt install --reinstall --allow-downgrades $(dpkg --get-selections '*php*' | mawk '{print $1}')

MichaIng
Thank you for joining this conversation. Joulinar has been absolutely brilliant up until this point, but needed your input - so I thank you again.

The first two commands worked fine from what I could see, but when I tried the last command this is what I saw -

apt install --reinstall --allow-downgrades $(dpkg --get-selections '*php*' | mawk '{print $1}')
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reinstallation of php-common is not possible, it cannot be downloaded.
Reinstallation of php7.3-cli is not possible, it cannot be downloaded.
Reinstallation of php7.3-common is not possible, it cannot be downloaded.
Reinstallation of php7.3-fpm is not possible, it cannot be downloaded.
Reinstallation of php7.3-gd is not possible, it cannot be downloaded.
Reinstallation of php7.3-intl is not possible, it cannot be downloaded.
Reinstallation of php7.3-json is not possible, it cannot be downloaded.
Reinstallation of php7.3-mbstring is not possible, it cannot be downloaded.
Reinstallation of php7.3-mysql is not possible, it cannot be downloaded.
Reinstallation of php7.3-opcache is not possible, it cannot be downloaded.
Reinstallation of php7.3-readline is not possible, it cannot be downloaded.
Reinstallation of php7.3-xml is not possible, it cannot be downloaded.
Reinstallation of php7.3-zip is not possible, it cannot be downloaded.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.3-curl : Depends: php7.3-common (= 7.3.31-1~deb10u1) but 7.3.31-1+0~20210923.88+debian9~1.gbpac4058 is to be installed
E: Unable to correct problems, you have held broken packages.

Please try:

apt purge php7.3-curl
apt update
apt install --reinstall --allow-downgrades $(dpkg --get-selections '*php*' | mawk '{print $1}')