Php8 update -->> site broken

Hello,

I just upgraded my php-version form 7.3 to 8.0.
Now i can’t access the site anymore and i got the message below.

is there somebody who know what i forgot to do or is there a problem with php8??

Thanks

I think actually it is not a really good idea to use PHP8 for Nextcloud.

But i think there is another problem.
The output shows me that php is not used.
Have you installed it correctly and activated it for Apache2?

Check:
apache2ctl -M
or
apache2ctl -M |grep -i php

The cloud was up and running before, i got 2 days before i installed php8 the issue, that the dashboard just shows a white screen and ithougtzh maybe this will fix it.

I got this after the commands.

Sorry. But there is no php module activated.

sudo a2enmod php8.0
sudo service apache2 restart

Do you use Ubuntu or Debian?
Why are you using php8?
What was your package source?

@chrmo pls take into consideration that php8 hasn’t got any support from any NC-version so far. recommended for nc20 is php7.4

I tried to switch back to php7.4 ang now im getting an internal server error…
I have no idea how ti fix this

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Finally I fixed it with a downgrade to php7.4

Thanks to all

Hi !
Same mistake, I didn’t read well enough/checked if nextcloud supported php8.0 when apt upgraded php version to 8.0.1.
I disinstalled php8.0, now php7.4 is back (tried this method to be sure that nextcloud was back on php7.4) and nextcloud still show internal server error.
I find nothing particular on the logs.

I cannot run any occ commands, i get this error :

An unhandled exception has been thrown: Error: Call to undefined function OC\App\simplexml_load_file() in /var/www/html/nextcloud/lib/private/App/InfoParser.php:65 Stack trace: #0 /var/www/html/nextcloud/lib/private/App/AppManager.php(511): OC\App\InfoParser->parse() #1 /var/www/html/nextcloud/lib/private/legacy/OC_App.php(581): OC\App\AppManager->getAppInfo() #2 /var/www/html/nextcloud/lib/private/AppFramework/App.php(69): OC_App::getAppInfo() #3 /var/www/html/nextcloud/lib/private/legacy/OC_App.php(264): OC\AppFramework\App::buildAppNamespace() #4 /var/www/html/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php(100): OC_App::registerAutoloading() #5 /var/www/html/nextcloud/lib/base.php(644): OC\AppFramework\Bootstrap\Coordinator->runRegistration() #6 /var/www/html/nextcloud/lib/base.php(1091): OC::init() #7 /var/www/html/nextcloud/console.php(49): require_once('/var/www/html/n...') #8 /var/www/html/nextcloud/occ(11): require_once('/var/www/html/n...')

when I do apache2ctl -M I get this error :

SSLCertificateFile: file '/etc/letsencrypt/live/<i>my website's address</i>/fullchain.pem' does not exist or is empty

But the file exists and the certbot of letsencrypt doesn’t find any errors.

I run nextcloud 20.0.5 - Ubuntu server 18 - apache2 - postgresSQL (cannot generate report anymore)

Thanks for your help!

Is there a reason for upgrading PHP-version? Normally the admin uses the php version from the offical release and not e.g. PPAs or backports.

Ubuntu 20.04 LTS with PHP version 7.4
-> please do not use non-LTS-versions for Nextcloud (e.g. 20.10, 21.04, 21.10)
Debian Buster (Stable) with PHP version 7.3
Debian Bullseye (Testing) with PHP 7.4 or PHP 8.0

Well no good reasons, I’m still on the ubuntu server 18.04 and months ago, nextcloud flagged that php7.4 was needed but it was not on the official release yet. So I switched to the more advanced PPA.

Found out that nothing was in my apache logs but i have a long error in the nextcloud/data/nextcloud.log :

{“reqId”:“kJGQAUric7IlPP021WMK”,“level”:3,“time”:“2021-01-18T10:06:08+00:00”,“remoteAddr”:“ipadress”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/nextcloud/index.php/204",“m
essage”:{“Exception”:“OC\HintException”,“Message”:“Memcache \OC\Memcache\APCu not available for local cache”,“Code”:0,“Trace”:[{“file”:"/var/www/html/nextcloud/lib/private/Serv
er.php",“line”:677,“function”:"__construct",“class”:“OC\Memcache\Factory”,“type”:"->"},{“file”:"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",“lin
e”:155,“function”:“OC\{closure}”,“class”:“OC\Server”,“type”:"->",“args”:["*** sensitive parameters replaced "]},{“file”:"/var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pim
ple/Container.php",“line”:118,“function”:“OC\AppFramework\Utility\{closure}”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:"->",“args”:["
sensitive parameters r
eplaced "]},{“file”:"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",“line”:122,“function”:“offsetGet”,“class”:“Pimple\Container”,“type”:"->"},{“f
ile”:"/var/www/html/nextcloud/lib/private/ServerContainer.php",“line”:156,“function”:“query”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:"->"},{“file”:"/var/www/htm
l/nextcloud/lib/private/Server.php",“line”:1677,“function”:“query”,“class”:“OC\ServerContainer”,“type”:"->"},{“file”:"/var/www/html/nextcloud/lib/private/Server.php",“line”:854,“f
unction”:“getMemCacheFactory”,“class”:“OC\Server”,“type”:"->"},{“file”:"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",“line”:155,“function”:“OC\{c
losure}”,“class”:“OC\Server”,“type”:"->",“args”:["
sensitive parameters replaced "]},{“file”:"/var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php",“line”
:118,“function”:“OC\AppFramework\Utility\{closure}”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:"->",“args”:["
sensitive parameters replaced "]},{“file”:"/
var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",“line”:122,“function”:“offsetGet”,“class”:“Pimple\Container”,“type”:"->"},{“file”:"/var/www/html/nextc
loud/lib/private/ServerContainer.php",“line”:156,“function”:“query”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:"->"},{“file”:"/var/www/html/nextcloud/lib/private/A
ppFramework/Utility/SimpleContainer.php",“line”:56,“function”:“query”,“class”:“OC\ServerContainer”,“type”:"->"},{“file”:"/var/www/html/nextcloud/lib/private/AppFramework/Utility/S
impleContainer.php",“line”:177,“function”:“get”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:"->"},{“file”:"/var/www/html/nextcloud/lib/private/AppFramework/Utility/
SimpleContainer.php",“line”:155,“function”:“OC\AppFramework\Utility\{closure}”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:"->",“args”:["
sensitive parameters
replaced "]},{“file”:"/var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php",“line”:114,“function”:“OC\AppFramework\Utility\{closure}”,“class”:“OC\AppFram
ework\Utility\SimpleContainer”,“type”:"->",“args”:["
sensitive parameters replaced ***"]},{“file”:"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php
“,“line”:122,“function”:“offsetGet”,“class”:“Pimple\Container”,“type”:”->"},{“file”:"/var/www/html/nextcloud/lib/private/ServerContainer.php",“line”:156,“function”:“query”,“class”
:“OC\AppFramework\Utility\SimpleContainer”,“type”:"->"},{“file”:"/var/www/html/nextcloud/lib/private/Server.php",“line”:1886,“function”:“query”,“class”:“OC\ServerContainer”,“ty
pe”:"->"},{“file”:"/var/www/html/nextcloud/lib/private/legacy/OC_App.php",“line”:370,“function”:“getAppManager”,“class”:“OC\Server”,“type”:"->"},{“file”:"/var/www/html/nextcloud/l
ib/private/legacy/OC_Util.php",“line”:1460,“function”:“getEnabledApps”,“class”:“OC_App”,“type”:"::"},{“file”:"/var/www/html/nextcloud/lib/public/Util.php",“line”:516,“function”:“ne
edUpgrade”,“class”:“OC_Util”,“type”:"::"},{“file”:"/var/www/html/nextcloud/lib/private/legacy/OC_Template.php",“line”:117,“function”:“needUpgrade”,“class”:“OCP\Util”,“type”:"::"},
{“file”:"/var/www/html/nextcloud/lib/private/legacy/OC_Template.php",“line”:78,“function”:“initTemplateEngine”,“class”:“OC_Template”,“type”:"::"},{“file”:"/var/www/html/nextcloud/l
ib/private/legacy/OC_Template.php",“line”:322,“function”:"__construct",“class”:“OC_Template”,“type”:"->"},{“file”:"/var/www/html/nextcloud/index.php",“line”:55,“function”:“printExc
eptionErrorPage”,“class”:“OC_Template”,“type”:"::"}],“File”:"/var/www/html/nextcloud/lib/private/Memcache/Factory.php",“Line”:98,“Hint”:“Is the matching PHP module installed and en
abled?”,“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Android) Nextcloud-android/3.14.3”,“version”:“20.0.5.2”}

that might be a missing php7.4 extension?

Why are you not upgading to Ubuntu 20.04 LTS ? Then you get PHP 7.4.

Yes you can use Ubuntu 18.04 LTS till April 2023. But normally admins upgrade in the year after the next lts release. I think it is time to to upgrade from 18.04 LTS to 20.04 LTS. Why not?

Ubuntu Releases

Yeah I’ll do that once my instance will be fixed.
I think it’s not a php related problem, every needed php7.4 extensions for nextcloud are installed.

Resolved, guess the redis params where broken and needed to be reinstalled.
Cheers !

I see @mcolomb and @chrmo had the same problem as I am experiencing.
But reverting to PHP 7.4 doesn’t work for me.
Still cannot start nextcloud20, it says “internal server error 500”.
How exactly do you manage to get it back on 7.4 and running nextcloud again???

Plus I now have the additional problem that the rar extension which I re-installed using “pecl” seems to be for PHP8 and doesn’t want to work with php7.4 anymore too. Any solution for that too?

Well, in short, get rid of every php8 packages with apt remove php8* and reinstall every php7.4 modules needed for nextcloud. Then you have to change parameters like you did when you first installed your instance

1 Like

This actually worked. Though I don’t have any longer the option to install or update apps within nextcloud. How do I get this function back?