# Raspbian php7 to php8 and nextcloud upgrade how to

**URL:** <https://help.nextcloud.com/t/raspbian-php7-to-php8-and-nextcloud-upgrade-how-to/162881>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Tags:** ncp\
**Created:** [May 25, 2023, 7:05pm UTC](https://help.nextcloud.com/t/raspbian-php7-to-php8-and-nextcloud-upgrade-how-to/162881 "2023-05-25T19:05:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![martingwb](https://help.nextcloud.com/user_avatar/help.nextcloud.com/martingwb/32/20468_2.png) [@martingwb](https://help.nextcloud.com/u/martingwb)\
**Post date:** [May 25, 2023, 7:05pm UTC](https://help.nextcloud.com/t/raspbian-php7-to-php8-and-nextcloud-upgrade-how-to/162881/1 "2023-05-25T19:05:05Z")

</div>

Hi,  
I am running 25.0.3 with ncp 1.52.0 on a rpi (bullseye) and want to upgrade to 25.0.7 in a first step and later to 26.0.x  
As there is no php8 available from bullseye repos (there are 3rd party with 8.1 available), what is the sequence of actions I need to take to successfully run an upgrade?

The upgrade process keeps uninstalling php8.1 and rolling back the upgrade or telling me that no php8 is available.

Thank you for guiding me to documentation about this.  
kr,  
Martin

---

<div class="post-metadata">

**Author:** ![FadeFx](https://help.nextcloud.com/user_avatar/help.nextcloud.com/fadefx/32/9921_2.png) [@FadeFx](https://help.nextcloud.com/u/FadeFx)\
**Post date:** [May 29, 2023, 2:28pm UTC](https://help.nextcloud.com/t/raspbian-php7-to-php8-and-nextcloud-upgrade-how-to/162881/2 "2023-05-29T14:28:51Z")

</div>

it seems you are seeing similar problems to me, i had been going the way already to update to 25.0.6 but also this went bad… i thought it might be my fault because i had updated php to 8.1 already a while back for some other reason, but it seems to be a general problem then…

> [@Update from 25.0.3.2 to 25.0.6 fails (wrong php version?)](https://help.nextcloud.com/t/update-from-25-0-3-2-to-25-0-6-fails-wrong-php-version/163058/1):
>
> Hi, i tried to update my nextcloud instance from 25.0.3.2 initially to 26.0.1 which failed, so i tried to first go to 25.0.6. all that using NCP 1.52.0 The ncp pannel told me that i had to use ncp-config due to a neccessary update of php version [nc-update-nextcloud] (Mon May 29 09:23:31 CEST 2023) We need to upgrade PHP. This process cannot be performed from the web UI. Please use 'ncp-config' from the terminal (via SSH or direct access) to update Nextcloud instead. Future updates can agai…

---

<div class="post-metadata">

**Author:** ![martingwb](https://help.nextcloud.com/user_avatar/help.nextcloud.com/martingwb/32/20468_2.png) [@martingwb](https://help.nextcloud.com/u/martingwb)\
**Post date:** [June 15, 2023, 4:17pm UTC](https://help.nextcloud.com/t/raspbian-php7-to-php8-and-nextcloud-upgrade-how-to/162881/3 "2023-06-15T16:17:52Z")

</div>

Good to see I am not the only one running into this issue.

Can anyone help with suggesting how to avoid that ncp is rolling back php or can we expect a ncp version which avoids this behaviour?

---

<div class="post-metadata">

**Author:** ![FadeFx](https://help.nextcloud.com/user_avatar/help.nextcloud.com/fadefx/32/9921_2.png) [@FadeFx](https://help.nextcloud.com/u/FadeFx)\
**Post date:** [June 15, 2023, 5:24pm UTC](https://help.nextcloud.com/t/raspbian-php7-to-php8-and-nextcloud-upgrade-how-to/162881/4 "2023-06-15T17:24:40Z")

</div>

Seems like we need to downgrade PHP to 7.3 and then do the update to 26.0.1.  
As mentioned in this thread:

> [@Several issues with NCP update and PHP update](https://help.nextcloud.com/t/several-issues-with-ncp-update-and-php-update/148363):
>
> Debian 11 Stable on a x64 NUC Nextcloud 24.0.5.1 NextCloudPi version v1.50.3 PHP 7.4.30 Major issue, PHP 8.1 Oct. 22nd I ran a package update on my Debian 11 server and it updated the PHP version to 8.1x. After this I was unable to access the webUI for Nextcloud, and Webdav wouldn’t communicate. I rolled it back with a snapshot to undo the package updates, and it all works again. I read here [[SOLVED] After Debian 11 upgrade "Failed to connect to the database..."](https://help.nextcloud.com/t/solved-after-debian-11-upgrade-failed-to-connect-to-the-database/134797) that Nextcloud doesn’t sup…

---

<div class="post-metadata">

**Author:** ![martingwb](https://help.nextcloud.com/user_avatar/help.nextcloud.com/martingwb/32/20468_2.png) [@martingwb](https://help.nextcloud.com/u/martingwb)\
**Post date:** [June 15, 2023, 5:59pm UTC](https://help.nextcloud.com/t/raspbian-php7-to-php8-and-nextcloud-upgrade-how-to/162881/5 "2023-06-15T17:59:48Z")

</div>

Can anyone give a hint how to avoid nc-update-nextcloud doing this during the upgrade?  
Why is ncp rolling back from a recommended (8.1) to a deprecated (7.4) php version?

> …  
> php7.4-fpm: unrecognized service  
> Something went wrong while upgrading PHP. Rolling back to version 7.4…  
> Conf php8.1-fpm disabled.  
> …

---

<div class="post-metadata">

**Author:** ![FadeFx](https://help.nextcloud.com/user_avatar/help.nextcloud.com/fadefx/32/9921_2.png) [@FadeFx](https://help.nextcloud.com/u/FadeFx)\
**Post date:** [June 16, 2023, 6:03pm UTC](https://help.nextcloud.com/t/raspbian-php7-to-php8-and-nextcloud-upgrade-how-to/162881/6 "2023-06-16T18:03:33Z")

</div>

it seems like we need to do a manual rollback to 7.4, after that we can do the update to NC25.0.6 and further on to 26.0.1, as it is mentioned in the thread i linked, NCP is not supposed to do soemthing like apt-get upgrade on the console or installing a different PHP version manually…

i am actually thinking of moving to a complete self managed installation of nextcloud at some point, or just remove NCP from the system. But this wont happen too soon, for now i am happy to have a running 25.x.x NC version

---

<div class="post-metadata">

**Author:** ![martingwb](https://help.nextcloud.com/user_avatar/help.nextcloud.com/martingwb/32/20468_2.png) [@martingwb](https://help.nextcloud.com/u/martingwb)\
**Post date:** [June 21, 2023, 7:00am UTC](https://help.nextcloud.com/t/raspbian-php7-to-php8-and-nextcloud-upgrade-how-to/162881/7 "2023-06-21T07:00:40Z")

</div>

Looks like the reason for the nc rollback was that one of the apps required \>=php8.  
Deactivating the app and manually rolling php back to 7.4 solved the situation and the upgrade to 25.0.6 completed successfully.

---

<div class="post-metadata">

**Author:** ![FadeFx](https://help.nextcloud.com/user_avatar/help.nextcloud.com/fadefx/32/9921_2.png) [@FadeFx](https://help.nextcloud.com/u/FadeFx)\
**Post date:** [June 24, 2023, 9:05am UTC](https://help.nextcloud.com/t/raspbian-php7-to-php8-and-nextcloud-upgrade-how-to/162881/8 "2023-06-24T09:05:15Z")

</div>

which App?

---

<div class="post-metadata">

**Author:** ![martingwb](https://help.nextcloud.com/user_avatar/help.nextcloud.com/martingwb/32/20468_2.png) [@martingwb](https://help.nextcloud.com/u/martingwb)\
**Post date:** [June 24, 2023, 9:10am UTC](https://help.nextcloud.com/t/raspbian-php7-to-php8-and-nextcloud-upgrade-how-to/162881/9 "2023-06-24T09:10:54Z")

</div>

[Polls](https://apps.nextcloud.com/apps/polls)

---

<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 14, 2024, 12:30pm UTC](https://help.nextcloud.com/t/raspbian-php7-to-php8-and-nextcloud-upgrade-how-to/162881/10 "2024-12-14T12:30:20Z")

</div>


