1

So it appears that after a recent Arch system upgrade, my NextCloud server no longer works, currently giving me "This version of Nextcloud is not compatible with > PHP 7.4. You are currently running 8.0.1."

php -v now gives me PHP 8.0.1 but i do have also have /usr/bin/php7 (PHP 7.4.14) installed.

I basically just use PHP for nextcloud (cur. v20.0.6-1), trough Apache + php-fpm

So i'm wondering what would be the proper "arch way", or workaround, to opt to rather continue using php7 ? (at least for the time being)

Any way i could e.g downgrade the php and php-fm packages or something? (preferably without it breaking something else) . Or should i perhaps just rather await for a new nextcloud version to be compatible with current phpversion ?

DhP
  • 161
  • 2
  • 6

1 Answers1

1

So finally got NextCloud working again. And i figured i'd post some notes about how here, for my own future reference, and as tip for anyone else perhaps facing the same problem.

I apologize for not making the answer more detailed and way less messy. But i messed around so much i'm not even entirely sure if i'm perhaps missing one or more points in this.

Installed Arch packages:

php7 php7-apache php7-apcu php7-fpm php7-gd php7-igbinary php7-imagick php7-imap php7-intl php7-memcache php7-memcached php7-pgsql php7-redis php7-sqlite php7-xsl

(These might depend on the Nextcloud apps desired/installed See Nextcloud prerequisites for more detail.)

Check (and edit) /etc/php7/php.ini for required php extensions:

Add any missing php extensions/modules.

$ php7 -m  # confirm that the needed modules are enabled

[PHP Modules]
bcmath
bz2
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gmp
hash
iconv
igbinary
imagick
imap
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
redis
Reflection
session
SimpleXML
SPL
standard
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Enable and start php-fpm7:

$ sudo systemctl enable php-fpm7.service && sudo systemctl start php-fpm7.service

(note: I also disabled php-fpm.servicesince nextcloud is the only thing used in my case, though this might be unnecessary)

Add this to the Apache virtualhost running nextcloud:

<FilesMatch \.php$>
    SetHandler "proxy:unix:/run/php-fpm7/php-fpm.sock|fcgi://localhost/"
</FilesMatch>

Fix nextcloud systemd cronjobs:

Simply change php to php7 in /etc/systemd/system/nextcloudcron.service.

ExecStart=/usr/bin/php7 -f /srv/http/nextcloud/cron.php

Restart the necessary services, or reboot server.

That should do it..I think..

DhP
  • 161
  • 2
  • 6