Good evening,
after updating the system (raspberry pi os) I can no longer access owncloud via the web…
from shel I tried to issue the following commands:
Blockquotepi@raspberrypi:~ $ cd /var/www/owncloud/pi@raspberrypi:/var/www/owncloud $ sudo -u www-data php occ maintenance:mode -off
This version of ownCloud is not compatible with PHP 8.0
You are currently running PHP 8.2.12.
Blockquote
the error is in the php version (I have installed
or 7)…
could you tell me how to solve it?
I had foreseenly installed php 7.4, in fact now trying to install it:
Blockquote
pi@raspberrypi:~ $ sudo apt-get install php7.4 libapache2-mod-php7.4 php7.4-cli php7.4-fpm php7.4-common php7.4-mbstring php7.4-gd php7.4-intl php7.4-xml php7.4-mysql php7.4-zip php7.4-curl php7.4-ldap php7.4-bz2 php-ssh2 php-apcu php-smbclient php-imagick libmagickcore-dev -y
Lettura elenco dei pacchetti… Fatto
Generazione albero delle dipendenze… Fatto
Lettura informazioni sullo stato… Fatto
libmagickcore-dev è già alla versione più recente (8:6.9.11.60+dfsg-1.3+deb11u1).
libapache2-mod-php7.4 è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
php-apcu è già alla versione più recente (5.1.22+±1+0~20230618.37+debian11~1.gbp7134d4).
php-imagick è già alla versione più recente (3.7.0-4+0~20230701.41+debian11~1.gbpbf7e27).
php-smbclient è già alla versione più recente (1.1.1-1+0~20230612.24+debian11~1.gbp8be856).
php-ssh2 è già alla versione più recente (1.4-1+0~20230612.27+debian11~1.gbpbf65fb).
php7.4 è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
php7.4-bz2 è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
php7.4-cli è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
php7.4-common è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
php7.4-curl è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
php7.4-fpm è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
php7.4-gd è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
php7.4-intl è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
php7.4-ldap è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
php7.4-mbstring è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
php7.4-mysql è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
php7.4-xml è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
php7.4-zip è già alla versione più recente (1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414).
0 aggiornati, 0 installati, 0 da rimuovere e 0 non aggiornati.
You can set the default PHP CLI version using update-alternatives or you can explicitly call php7.4 in your commands. You could also simply uninstall other PHP versions if you don’t need them.
with apr purge php8.* I managed to uninstall php 8, now typing php -v tells me that version 7.4.33 is in use, calling the owncloud IP address still doesn’t open the login screen…
I also gave this command:
pi@raspberrypi:/var/www/owncloud $ sudo -u www-data php occ maintenance:mode --off
Maintenance mode disabled
Nothing
It may be your Apache web server is still using the PHP 8.2 version. You can double-check this by creating a phpinfo.php file under your Document Root and calling it over browser.
If this is the case, you may need to run the a2dismod and a2enmod commands in order for Apache to use correct PHP version.
It doesn’t even let me open phpinfo.php, I still tried to issue the commands you posted, here’s the result:
Blockquote
pi@raspberrypi:~ $ a2dismod
Your choices are: access_compat alias auth_basic authn_core authn_file authz_core authz_host authz_user autoindex deflate dir env filter headers mime mpm_prefork negotiation php7.4 reqtimeout rewrite setenvif socache_shmcb ssl status
Which module(s) do you want to disable (wildcards ok)?
safari cannot open the page because the connection to the server failed
I activated ssl therefore the automatic redirection https:// etc etc
I noticed, if I only type the IP I am redirected to www…
I checked the file but everything is set correctly (I also deleted the browsing history on the various browsers I use) but nothing…
pi@raspberrypi:~ $ sudo systemctl restart apache2
Job for apache2.service failed because the control process exited with error code.
See “systemctl status apache2.service” and “journalctl -xe” for details.
Blockquote
pi@raspberrypi:~ $ systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2023-11-17 00:09:45 CET; 19h ago
Docs: Apache HTTP Server Version 2.4 Documentation - Apache HTTP Server Version 2.4
Process: 15189 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
CPU: 91ms
nov 17 00:09:45 raspberrypi apachectl[15192]: AH00558: apache2: Could not reliably determine the server’s fully qual>
nov 17 00:09:45 raspberrypi apachectl[15192]: (2)No such file or directory: AH02291: Cannot access directory '/var/l>
nov 17 00:09:45 raspberrypi apachectl[15192]: (2)No such file or directory: AH02291: Cannot access directory '/var/l>
nov 17 00:09:45 raspberrypi apachectl[15192]: (2)No such file or directory: AH02291: Cannot access directory '/var/l>
nov 17 00:09:45 raspberrypi apachectl[15192]: AH00014: Configuration check failed
nov 17 00:09:45 raspberrypi apachectl[15189]: Action ‘start’ failed.
nov 17 00:09:45 raspberrypi apachectl[15189]: The Apache error log may have more information.
nov 17 00:09:45 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
nov 17 00:09:45 raspberrypi systemd[1]: apache2.service: Failed with result ‘exit-code’.
nov 17 00:09:45 raspberrypi systemd[1]: Failed to start The Apache HTTP Server.
pi@raspberrypi:~ $ journalctl -xe
░░
░░ La fase di avvio è done.
nov 17 19:24:33 raspberrypi systemd[24403]: Listening on D-Bus User Message Bus Socket.
░░ Subject: L’unità UNIT ha terminato la fase di avvio
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ L’unità UNIT ha terminato la fase di avvio.
░░
░░ La fase di avvio è done.
nov 17 19:24:33 raspberrypi systemd[24403]: Reached target Sockets.
░░ Subject: L’unità UNIT ha terminato la fase di avvio
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ L’unità UNIT ha terminato la fase di avvio.
░░
░░ La fase di avvio è done.
nov 17 19:24:33 raspberrypi systemd[24403]: Reached target Basic System.
░░ Subject: L’unità UNIT ha terminato la fase di avvio
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ L’unità UNIT ha terminato la fase di avvio.
░░
░░ La fase di avvio è done.
nov 17 19:24:33 raspberrypi systemd[24403]: Reached target Main User Target.
░░ Subject: L’unità UNIT ha terminato la fase di avvio
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ L’unità UNIT ha terminato la fase di avvio.
░░
░░ La fase di avvio è done.
nov 17 19:24:33 raspberrypi systemd[24403]: Startup finished in 263ms.
░░ Subject: L’istanza di gestione per l’utente è completata
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ L’istanza di gestione per l’utente 1000 è stata avviata. Tutti i servizi
░░ interrogati sono stati avviati. Altri servizi potrebbero essere ancora in
░░ fase di avvio o in attesa di essere avviati.
░░
░░ L’avvio dell’istanza ha impiegato 263066 microsecondi.
nov 17 19:24:33 raspberrypi systemd[1]: Started User Manager for UID 1000.
░░ Subject: L’unità user@1000.service ha terminato la fase di avvio
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ L’unità user@1000.service ha terminato la fase di avvio.
░░
░░ La fase di avvio è done.
nov 17 19:24:33 raspberrypi systemd[1]: Started Session 157 of user pi.
░░ Subject: L’unità session-157.scope ha terminato la fase di avvio
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ L’unità session-157.scope ha terminato la fase di avvio.
░░
░░ La fase di avvio è done.
lines 2850-2909/2909 (END)
i think the output above is stripped and doesn’t include the full log output and it is e.g. stripped here at the >:
nov 17 00:09:45 raspberrypi apachectl[15192]: AH00558: apache2: Could not reliably determine the server’s fully qual>
nov 17 00:09:45 raspberrypi apachectl[15192]: (2)No such file or directory: AH02291: Cannot access directory '/var/l>