Nextcloud says wrong PHP-Version

I am running Nextcloud for years and now Version 27.1.0. But today suddenly I cannot login, it only shows the message
“This version of Nextcloud requires at least PHP 8.0
You are currently running 5.6.40. Please update your PHP version.”
I definitly have PHP 8.1.22 on the HostingServer, even my other TestNextcloud works without Problems.
I thought that maybe an upgrade via “occ update” to 27.1.1 would solve the problem, but I have the same error.
What can I do?

thanks
Joe

Do a php --version on command line.
Maybe version 5 still is installed and the php-commands direct do it.

“php --version
PHP 8.1.22 (cli) (built: Aug 9 2023 11:15:51) (NTS)”
Is definitly not PHP 5.
I dont know what to do now.
Any idea?

joe

Are you on a Shared Hosting Provider?
Can you define php versions for each folder?

Yes, I’m on a Shared Hosting Provider. But I only can define php-version for the whole shared account.
I also have two joomla4 websites running, without problems.
So it seems only a problem with the nextcloud.
A second nextcloud installation works fine on the same shared hosting account.
Any idea?

Joe

What says the phpinfo block on https://yourcloud.tld/settings/admin/serverinfo

1 Like

It i not possible to call anything inside de domain. The error message is the same as only the nextcloud domain.
“This version of Nextcloud requires at least PHP 8.0
You are currently running 5.6.40. Please update your PHP version.”
I have no idea what to do.

Joe

That provides no valuable information at all. It only shows the version of the PHP binary you invoke on the command line, but says nothing about the PHP binary used by the specific web server instance used by your nextcloud. You can run multiple PHP binaries on a server at the same time. That is not uncommon on shared servers.
So you need to find out which PHP (whether PHP-FPM or Apache module) is being called by the web server in question.
I dont know how your shared server is organized but it is very comon, that you can switch the php version, from project to project and not from server to server.

I only can set the php-version in cpanel for my whole account by my shared hosting provider. It is definitly not possible to set different php-versions inside my account.

Joe

You do not name your Hosting provider and your package. So it is really hard to help.

Please do the following:

2 Likes

You will not know my provider, it is not one of the big ones. https://serverprofis.de .
It is definitly so, that there’s only one php-version possible to set and its 8.1.
Even the other nextcloud on the same hosting account is working > see png.
The problem must be inside this one nextcloud installation. There are only 3 users on the nextcloud, so I think to make a new clean i Installation.
But it is interesting for me why and how this problem with php-version is coming only to this one nextcloud after 5 years perfect running, and the other one is running normally.

Joe

I notice that you are extremely certain about everything:

but yet you have only chatted with Germans here so far,

nextcloud clearly tells you something different!

I wouldn’t be so sure!

I would advise you to contact Serverprofis’ customer support with your log entries so that they can get to the bottom of the matter.

Much luck!

And this is the problem. What Nextcloud tells is wrong. Five years this nextcloud installation was running without problems, and yesterday suddenly it says wrong php-version.
Sure, at first I contacted the provider if they changed anything. But no, they even not know what could be happen.

In the error_log I see the following
[22-Sep-2023 21:47:26 UTC] PHP Warning: Unsupported declare ‘strict_types’ in /lib/versioncheck.php on line 3

Joe

This is further proof that a php interpreter from before 7.0 is at start and that it is NOT a Nextcloud kind of bug, because strict_mode is supported from php 7.0 onwards.

much luck!

1 Like

See my previous posting. Please create the phpinfo file and check the results.

btw. Mein Gott sind die teuer. Habe mal gerade Nextcloud angeschaut.

Naja, nur teuer wenn du eine fertige Nextcloud nimmst.
Ich habe den Business L5.1 12,50 je Monat und installiere mir alles selbst.

Trotzdem danke - ich checke weiter und schreibe den Fehler dann hier rein.

LG
Joe

Problem solved. I checked in the PHP-Extensions nd_mysqli instead of mysqli and everything works fine now.
But still I dont understand, why only one Nextcloud makes problems while the other nextclouds and even joomlas are running fine.

Thanks
Joe

On shared hosting you will never know what could happen because you do not have the full picture of the installation.

Glad you solved it.

Cheers

1 Like