# Update php to 7.4

**URL:** <https://help.nextcloud.com/t/update-php-to-7-4/144326>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Tags:** php, ncp\
**Created:** [August 24, 2022, 8:55am UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326 "2022-08-24T08:55:52Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeano](https://help.nextcloud.com/letter_avatar/jeano/32/6_22734026db12803ebb3e059622ac3534.png) [@Jeano](https://help.nextcloud.com/u/Jeano)\
**Post date:** [August 24, 2022, 8:55am UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/1 "2022-08-24T08:55:52Z")

</div>

Hello,  
To upgrade from Nextcloud 23 to 24 I need to have php 7.4. My current version is 7.3.31-1  
Can you please inform me what would be the best way to do the upgrade?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![OliverV](https://help.nextcloud.com/user_avatar/help.nextcloud.com/oliverv/32/5741_2.png) [@OliverV](https://help.nextcloud.com/u/OliverV)\
**Post date:** [August 24, 2022, 9:06am UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/2 "2022-08-24T09:06:26Z")

</div>

Provide some more info on your setup. If want assistance.  
NCP is already using php7.4 when using latest image afaik.

---

<div class="post-metadata">

**Author:** ![Jeano](https://help.nextcloud.com/letter_avatar/jeano/32/6_22734026db12803ebb3e059622ac3534.png) [@Jeano](https://help.nextcloud.com/u/Jeano)\
**Post date:** [August 24, 2022, 9:24am UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/3 "2022-08-24T09:24:44Z")

</div>

I have version 1.49 of nextcloudpi and Raspbian

---

<div class="post-metadata">

**Author:** ![Jeano](https://help.nextcloud.com/letter_avatar/jeano/32/6_22734026db12803ebb3e059622ac3534.png) [@Jeano](https://help.nextcloud.com/u/Jeano)\
**Post date:** [August 24, 2022, 5:16pm UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/4 "2022-08-24T17:16:33Z")

</div>

More infos

```auto
|NextCloudPi version|v1.49.0|
|---|---|
|OS|Raspbian GNU/Linux 10. 5.10.103-v7l+ (armv7l)|
|automount|yes|
|USB devices|sda sdb|
|datadir|/media/myCloudDrive/ncdata|
|data in SD|no|
|data filesystem|btrfs|
|data disk usage|461G/1.9T|
|rootfs usage|6.2G/15G|
|swapfile|/var/swap|
|dbdir|/var/lib/mysql|
|Nextcloud check|ok|
|Nextcloud version|23.0.8.1|
|HTTPD service|up|
|PHP service|up|
|MariaDB service|up|
|Redis service|up|
|HPB service|up|
|Postfix service|up|
|internet check|ok|
|port check 80|open|
|port check 443|open|
|IP|192.168.1.***|
|gateway|192.168.1.1|
|interface|eth0|

```

---

<div class="post-metadata">

**Author:** ![Jeano](https://help.nextcloud.com/letter_avatar/jeano/32/6_22734026db12803ebb3e059622ac3534.png) [@Jeano](https://help.nextcloud.com/u/Jeano)\
**Post date:** [August 24, 2022, 7:32pm UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/5 "2022-08-24T19:32:28Z")

</div>

if I run the command:`php -v` I get the following result

`````auto
PHP 7.3.31-1~deb10u1 (cli) (built: Oct 24 2021 15:18:08) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.31, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.31-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
````Texte préformaté`

can I use this tuto please to update ?
https://raspberry-pi.narkive.fr/2FCYgzYZ/php-7-4-sur-raspbian
`````

---

<div class="post-metadata">

**Author:** ![REAPERSbattlecry](https://help.nextcloud.com/letter_avatar/reapersbattlecry/32/6_22734026db12803ebb3e059622ac3534.png) [@REAPERSbattlecry](https://help.nextcloud.com/u/REAPERSbattlecry)\
**Post date:** [August 25, 2022, 5:43am UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/6 "2022-08-25T05:43:49Z")

</div>

Looks like you didn’t do the upgrade to Debian 11 yet. With this update also the php update is done.  
The update to Debian 11 is necessary to provide further security updates. It can be done the command ncp-dist-upgrade.  
Please backup all your data before the upgrade. It runs almost always without issues but we can’t test every combination of apps for example.

---

<div class="post-metadata">

**Author:** ![OliverV](https://help.nextcloud.com/user_avatar/help.nextcloud.com/oliverv/32/5741_2.png) [@OliverV](https://help.nextcloud.com/u/OliverV)\
**Post date:** [August 25, 2022, 6:53am UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/7 "2022-08-25T06:53:44Z")

</div>

> [@Jeano](#):
>
> `-v7l+ (armv7l)`

Also advise to upgrade to 64bit hardware, as some apps no longer support 32bit.

---

<div class="post-metadata">

**Author:** ![Jeano](https://help.nextcloud.com/letter_avatar/jeano/32/6_22734026db12803ebb3e059622ac3534.png) [@Jeano](https://help.nextcloud.com/u/Jeano)\
**Post date:** [August 25, 2022, 7:16am UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/8 "2022-08-25T07:16:19Z")

</div>

Thanks to both of you for the explanations  
I’ve already tried to do the update, and I always get an error. Every time I have to restore everything.  
I’ll do it again and put the error here

OliverV, how do you upgrade to 64bit?

---

<div class="post-metadata">

**Author:** ![Jeano](https://help.nextcloud.com/letter_avatar/jeano/32/6_22734026db12803ebb3e059622ac3534.png) [@Jeano](https://help.nextcloud.com/u/Jeano)\
**Post date:** [August 25, 2022, 7:31am UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/9 "2022-08-25T07:31:24Z")

</div>

here is the error  
sed: impossible de lire /etc/systemd/system/dhcpcd.service.d/wait.conf: Aucun fichier ou dossier de ce type  
Something went wrong. Fix it and try again

---

<div class="post-metadata">

**Author:** ![Jeano](https://help.nextcloud.com/letter_avatar/jeano/32/6_22734026db12803ebb3e059622ac3534.png) [@Jeano](https://help.nextcloud.com/u/Jeano)\
**Post date:** [August 25, 2022, 7:51am UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/10 "2022-08-25T07:51:45Z")

</div>

`ls /etc/systemd/system/`  
In the folder “system” I don’t have a dhcpcd.service.d folder, but dhcpcd5.service

 ![Capture d’écran 2022-08-25 094242](https://help.nextcloud.com/uploads/default/original/3X/5/3/53b6e0d911b9acb2bb73b43771fa36ab47c3b03b.png)

the dhcpcd5.service folder is empty  
`ls /etc/systemd/system/dhcpcd5.service`

---

<div class="post-metadata">

**Author:** ![REAPERSbattlecry](https://help.nextcloud.com/letter_avatar/reapersbattlecry/32/6_22734026db12803ebb3e059622ac3534.png) [@REAPERSbattlecry](https://help.nextcloud.com/u/REAPERSbattlecry)\
**Post date:** [August 25, 2022, 7:53am UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/11 "2022-08-25T07:53:45Z")

</div>

The upgrade to 64 bit requires a fresh installation. You need to make a backup of your instance. Install the image again. 64 bit is now default. Load your backup.

Remember to check first if your device is capable of 64bit.

---

<div class="post-metadata">

**Author:** ![Jeano](https://help.nextcloud.com/letter_avatar/jeano/32/6_22734026db12803ebb3e059622ac3534.png) [@Jeano](https://help.nextcloud.com/u/Jeano)\
**Post date:** [August 25, 2022, 8:17am UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/12 "2022-08-25T08:17:00Z")

</div>

I have 461G of data, so to restore all of it takes a lot of skill.  
I have already tried, without success. I don’t remember the error.  
I did it like this:

1. last image on the sd card
2. plug in the disk that will collect the data, problem it is not recognized, in my opinion I have to format it and move the data to it, the problem is that I risk losing all my data if the operation goes wrong. So I don’t want to try.
3. the second disk with the backup, it is not recognized either, it must be mounted and I don’t know how

Maybe the easiest thing for me right now would be to fix dhcpcd.service.d

---

<div class="post-metadata">

**Author:** ![vascocb](https://help.nextcloud.com/user_avatar/help.nextcloud.com/vascocb/32/27457_2.png) [@vascocb](https://help.nextcloud.com/u/vascocb)\
**Post date:** [August 28, 2022, 10:27am UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/13 "2022-08-28T10:27:52Z")

</div>

You can follow this guide.  
[Moving from armhf (32bit) to arm64 (Pi 4)](https://help.nextcloud.com/t/moving-from-armhf-32bit-to-arm64-pi-4/99075).

NextcloudPi Documentation  
[https://docs.nextcloudpi.com/](https://docs.nextcloudpi.com/)

---

<div class="post-metadata">

**Author:** ![Jeano](https://help.nextcloud.com/letter_avatar/jeano/32/6_22734026db12803ebb3e059622ac3534.png) [@Jeano](https://help.nextcloud.com/u/Jeano)\
**Post date:** [August 28, 2022, 1:22pm UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/14 "2022-08-28T13:22:34Z")

</div>

Excellent, I will follow it as soon as I have time.  
Thank you very much!

---

<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, 2:38pm UTC](https://help.nextcloud.com/t/update-php-to-7-4/144326/15 "2024-12-13T14:38:41Z")

</div>


