# This version of Nextcloud is not compatible with \> PHP 7.4.\<br/\>You are currently running 8.0.1

**URL:** <https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690>\
**Category:** ℹ️ Support\
**Tags:** nc20, cron, php\
**Created:** [January 26, 2021, 3:57pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690 "2021-01-26T15:57:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![maouu](https://help.nextcloud.com/letter_avatar/maouu/32/6_22734026db12803ebb3e059622ac3534.png) [@maouu](https://help.nextcloud.com/u/maouu)\
**Post date:** [January 26, 2021, 3:57pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/1 "2021-01-26T15:57:19Z")

</div>

Hello,

I need help please, my cron is broken since NC 20

When I launch : _php -f /var/www/nextcloud/cron.php_

I obtained : _**This version of Nextcloud is not compatible with \> PHP 7.4.  
You are currently running 8.0.1**_

My nextcloud is up to date : 20.0.6

How can I fix this error ?!

Thanks you very much

---

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/6_22734026db12803ebb3e059622ac3534.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [January 26, 2021, 4:11pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/2 "2021-01-26T16:11:04Z")

</div>

> How can I fix this error ?!

by using PHP 7.4 instead of PHP 8.

---

<div class="post-metadata">

**Author:** ![maouu](https://help.nextcloud.com/letter_avatar/maouu/32/6_22734026db12803ebb3e059622ac3534.png) [@maouu](https://help.nextcloud.com/u/maouu)\
**Post date:** [January 26, 2021, 4:12pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/3 "2021-01-26T16:12:22Z")

</div>

Ok so how can I downgrade my PHP version ?

---

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/6_22734026db12803ebb3e059622ac3534.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [January 26, 2021, 4:16pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/4 "2021-01-26T16:16:58Z")

</div>

I would need a liitle more information about your system, especially about the OS you’re running nextcloud on.

---

<div class="post-metadata">

**Author:** ![Reiner\_Nippes](https://help.nextcloud.com/user_avatar/help.nextcloud.com/reiner_nippes/32/9479_2.png) [@Reiner\_Nippes](https://help.nextcloud.com/u/Reiner_Nippes)\
**Post date:** [January 26, 2021, 4:17pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/5 "2021-01-26T16:17:08Z")

</div>

> [@maouu](#):
>
> Ok so how can I downgrade my PHP version ?

depends on your installation: os and web server?

---

<div class="post-metadata">

**Author:** ![maouu](https://help.nextcloud.com/letter_avatar/maouu/32/6_22734026db12803ebb3e059622ac3534.png) [@maouu](https://help.nextcloud.com/u/maouu)\
**Post date:** [January 26, 2021, 4:18pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/6 "2021-01-26T16:18:54Z")

</div>

I running on _ **Ubuntu Server 18.04.5 LTS** _ and _ **Nginx 1.18.0** _

---

<div class="post-metadata">

**Author:** ![Soko](https://help.nextcloud.com/user_avatar/help.nextcloud.com/soko/32/100_2.png) [@Soko](https://help.nextcloud.com/u/Soko)\
**Post date:** [January 26, 2021, 4:21pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/7 "2021-01-26T16:21:03Z")

</div>

If you don’t tell us, witch system you’re running, you can’t get an working answer…

Perhaps you du a websearch?

> **[Human verification](https://askubuntu.com/nocaptcha?s=2cda85f1-b73c-446f-81d3-d6b99658df37)**
>
> Q&A for Ubuntu users and developers

[https://www.google.com/search?q=downgrade+php](https://www.google.com/search?q=downgrade+php)

---

<div class="post-metadata">

**Author:** ![Soko](https://help.nextcloud.com/user_avatar/help.nextcloud.com/soko/32/100_2.png) [@Soko](https://help.nextcloud.com/u/Soko)\
**Post date:** [January 26, 2021, 4:27pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/8 "2021-01-26T16:27:41Z")

</div>

First Do a complete backup!

Than try this way, but beware it’s for apache not for nginx…

sudo add-apt-repository ppa:ondrej/php  
sudo apt-get update  
sudo apt-get install php7.4  
sudo apt-get install php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-mysql php7.4-mbstring php7.4-zip php7.4-fpm php7.4-intl php7.4-simplexml  
sudo a2dismod php7.4  
sudo a2enmod php7.4  
sudo service apache2 restart  
sudo update-alternatives --set php /usr/bin/php7.4  
sudo update-alternatives --set phar /usr/bin/phar7.4  
sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.4  
sudo update-alternatives --set phpize /usr/bin/phpize7.4  
sudo update-alternatives --set php-config /usr/bin/php-config7.4

---

<div class="post-metadata">

**Author:** ![Reiner\_Nippes](https://help.nextcloud.com/user_avatar/help.nextcloud.com/reiner_nippes/32/9479_2.png) [@Reiner\_Nippes](https://help.nextcloud.com/u/Reiner_Nippes)\
**Post date:** [January 26, 2021, 4:33pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/9 "2021-01-26T16:33:23Z")

</div>

> [@Soko](#):
>
> sudo a2dismod php7.4  
> sudo a2enmod php7.4

??? he is running nginx.

---

<div class="post-metadata">

**Author:** ![Soko](https://help.nextcloud.com/user_avatar/help.nextcloud.com/soko/32/100_2.png) [@Soko](https://help.nextcloud.com/u/Soko)\
**Post date:** [January 26, 2021, 4:42pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/10 "2021-01-26T16:42:14Z")

</div>

as i wrote…

> [@Soko](#):
>
> Than try this way, but beware it’s for apache not for nginx…

---

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/6_22734026db12803ebb3e059622ac3534.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [January 26, 2021, 4:46pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/11 "2021-01-26T16:46:32Z")

</div>

`sudo apt remove php*`

`sudo apt install php7.4-gd php7.4-mysql php7.4-curl php7.4-mbstring php7.4-intl php7.4-gmp php7.4-bcmath php-imagick php7.4-xml php7.4-zip`

These are the recommended packages from the nextcloud docs. Of course it depends on your sepcific installation what packages you have installed exactly. Do you have notes how you installed your Nextcloud the first time?

**Important: Do not use “apt purge”!** Because that deletes also the configuartion files. If you use `apt remove php*` only the packages will be removed and any changes in the configuration do not have to be made again after the downgrade, because the old configuration files will still be there.

---

<div class="post-metadata">

**Author:** ![Reiner\_Nippes](https://help.nextcloud.com/user_avatar/help.nextcloud.com/reiner_nippes/32/9479_2.png) [@Reiner\_Nippes](https://help.nextcloud.com/u/Reiner_Nippes)\
**Post date:** [January 26, 2021, 4:52pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/12 "2021-01-26T16:52:16Z")

</div>

@maouu and check your nginx config (most likely in `/etc/nginx/conf.d/`) if you use a unix socker with the php version on the path

```auto
upstream php-handler {
    # server 127.0.0.1:9000;
    server unix:/var/run/php/php7.4-fpm.sock;
}

```

---

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/6_22734026db12803ebb3e059622ac3534.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [January 26, 2021, 5:00pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/13 "2021-01-26T17:00:31Z")

</div>

…and one more thing: If you do not have any notes, here a little hint that may help:

`dpkg --get-selections | grep php` will show you all PHP-Packages that are installed on your system. Copy the output of this to a texteditor before you uninstall everything 😉

---

<div class="post-metadata">

**Author:** ![maouu](https://help.nextcloud.com/letter_avatar/maouu/32/6_22734026db12803ebb3e059622ac3534.png) [@maouu](https://help.nextcloud.com/u/maouu)\
**Post date:** [January 26, 2021, 5:30pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/14 "2021-01-26T17:30:44Z")

</div>

Thanks a lot everybody! I’ll downgrade my PHP

---

<div class="post-metadata">

**Author:** ![ckujau](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ckujau/32/7449_2.png) [@ckujau](https://help.nextcloud.com/u/ckujau)\
**Post date:** [January 29, 2021, 9:04am UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/15 "2021-01-29T09:04:47Z")

</div>

This happens [every](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-3/65332 "This version of Nextcloud is not compatible with > PHP 7.3") time, [again](https://help.nextcloud.com/t/docker-image-this-version-of-nextcloud-is-not-compatible-with-php-7-1/9625 "This version of Nextcloud is not compatible with PHP 7.1") and [again](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-2/47929 "This version of Nextcloud is not compatible with PHP 7.2") and [again](https://help.nextcloud.com/t/upgrade-old-nextcloud-10-on-php-7-3-6/55046 "Upgrade old Nextcloud 10 on PHP 7.3.6?") :-\

This time around though there is [no fix in sight](https://github.com/nextcloud/server/issues/24637 "Support PHP 8 #24637"):

> There are no plans to add support for PHP 8 to Nextcloud 20.

---

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/6_22734026db12803ebb3e059622ac3534.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [January 29, 2021, 10:06am UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/16 "2021-01-29T10:06:23Z")

</div>

@ckujau

On Arch you can install older PHP versions from the AUR. [PHP - ArchWiki](https://wiki.archlinux.org/index.php/PHP#Installation)

Beside of that a rolling release distro like Arch is maybe not the best choice to run server applications like nextcloud. At least if you don’t want to deal with regular changes to your system and their effects on the installed applications. 😉

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [January 29, 2021, 10:18am UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/17 "2021-01-29T10:18:16Z")

</div>

> [@ckujau](#):
>
> This happens [every](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-3/65332) time, [again](https://help.nextcloud.com/t/docker-image-this-version-of-nextcloud-is-not-compatible-with-php-7-1/9625) and [again](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-2/47929) and [again](https://help.nextcloud.com/t/upgrade-old-nextcloud-10-on-php-7-3-6/55046) :-\
> 
> This time around though there is [no fix in sight](https://github.com/nextcloud/server/issues/24637):
> 
> > There are no plans to add support for PHP 8 to Nextcloud 20.

Minor releases should not have such major changes that risk to break certain thing. In case of problems many people would complain about that. If you care about php8, you can join the developers and testers and alert everybody and test much earlier, so when NC 20 was still in development.

---

<div class="post-metadata">

**Author:** ![nonformality](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nonformality/32/35639_2.png) [@nonformality](https://help.nextcloud.com/u/nonformality)\
**Post date:** [March 2, 2021, 3:29pm UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/19 "2021-03-02T15:29:27Z")

</div>

For anyone with the same problem – in most cases, you will still have php7.4 on your machines, even if php8 gets installed (e.g. through sury). You do not need to uninstall php8, you can just specify that Nextcloud should use php7.4.

For example:  
sudo -u www-data php7.4 /var/www/nextcloud/occ maintenance:mode --off  
sudo -u www-data php7.4 /var/www/nextcloud/occ maintenance:mode --on

For cron to work:

crontab -u www-data -e

And change the line to read

\*/5 \* \* \* \* php7.4 -f /var/www/nextcloud/cron.php \> /dev/null 2\>&1

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 13, 2024, 6:29am UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/20 "2024-12-13T06:29:24Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 13, 2024, 6:29am UTC](https://help.nextcloud.com/t/this-version-of-nextcloud-is-not-compatible-with-php-7-4-br-you-are-currently-running-8-0-1/105690/21 "2024-12-13T06:29:26Z")

</div>


