Help needed after php upgrade to 8.1 - apache fatal: $HOME not set

I’m hoping someone can help. I’ve upgraded PHP in order to remain supported. I am now receiving the following error when trying to restart apache.

fatal: $HOME not set
warning: Not a git repository. Use --no-index to compare two paths outside a working tree
usage: git diff --no-index []

I successfully moved from 7.4 to 8.0 without any issues, but have done “something” on upgrading to 8.1. validate.php and daily.sh are both showing clear.

Any help to get apache running would be much appreciated as I can’t see my specific problem in the forum.

This looks to be relevant too - relating to the 8.1 php module:

Aug 04 20:54:49 TG-AZS-LNMS kernel: apache2[74819]: segfault at 88 ip 00007f47b84f8dd8 sp 00007ffc8b40f240 error 4 in libphp8.1.so[7f47b82fd000+2e5000]
Aug 04 20:54:49 TG-AZS-LNMS kernel: Code: fd 41 54 49 89 f4 55 49 01 fc 53 48 83 ec 20 4c 39 e7 0f 83 db 00 00 00 66 2e 0f 1f 84 00 00 00 00 00 49 8b 45 00 49 83 c5 20 <8b> 90 88 00 00 00 85 d2 0f 85 b2 00 00 00 48 8b 68 18 48 85 ed 0f

Are you using the apache php module or php-fpm?

Might be better to migrate to a php-fpm setup, you can follow that section of the install docs to convert.

Thankyou Tony. Went through the nginx and fpm parts of the install, changed some permissions and we’re back in business. The only time I touch a linux box is to do installs here so you cannot imagine how much I appreciate your help every time.

hi having a similar issue what permission did you change?