Wrong Php Version (5.6.25) for Nextcloud

NethServer Version: NethServer release 7.6.1810
Module: nextcloud

I cant get nextcloud up and running. I tried it as writen here
https://docs.nethserver.org/projects/nethserver-devel/en/latest/nethserver-nextcloud.html
the message I get is:

This version of Nextcloud requires at least PHP 7.1
You are currently running 5.6.25. Please update your PHP version.

I set the php version for apache on the backend to 7.2 this seems not to take place.

How can I reset the httpd ?

Thank you for your help
Peter

where

Usually you can just install from Software Center, no extra steps are needed as regards PHP. Nextcloud is preconfigured to use rh-php72.

http://docs.nethserver.org/en/v7/nextcloud.html

Maybe the repository providing php7 (SCLo, if I recall correctly) is disabled.

Can you post the exact steps you took?

1 Like

after I had some problems with nextcloud, some time ago. I made a clean uninstall as described here:
https://community.nethserver.org/t/nextcloud-on-nethserver-7/6886/22
then I reinstalled desribed here:https://docs.nethserver.org/projects/nethserver-devel/en/latest/nethserver-nextcloud.html including the steps to use a vvirtual host.
Btw. the virtual host is not listed the backends virtual hots section. I want to set a seperate ssl Certificate, but thats probably the next step :slight_smile:

You can view enabled repositories with:

yum repolist enabled

…for the php version used by nethserver for nextcloud, the ce-sclo-rh repository should be in the list.

Which php7 packages do you have installed?

rpm -qa *php7*

yum repolist enabled
Repo-ID Repo-Name: Status
!ce-base/7/x86_64 CE-Base-7.6.1810 10.019
!ce-extras/7/x86_64 CE-Extras-7.6.1810 409
!ce-sclo-rh/7/x86_64 CE-SCLo-rh-7.6.1810 8.185
!ce-sclo-sclo/7/x86_64 CE-SCLo-sclo-7.6.1810 771
!ce-updates/7/x86_64 CE-Updates-7.6.1810 1.982
*!epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13.221
!nethforge/7/x86_64 NethForge 7 182
!nethserver-base/7/x86_64 NethServer-7.6.1810 - Base 322
!nethserver-updates/7/x86_64 NethServer-7.6.1810 - Updates 332
!vmware-tools-collection vmware-tools-collection 43
repolist: 35.466

rpm -qa *php7*
php71-php-mysqlnd-7.1.24-1.el7.remi.x86_64
php70-php-pecl-zip-1.15.4-1.el7.remi.x86_64
php73-runtime-1.0-0.1.el7.remi.x86_64
php70-php-mbstring-7.0.32-1.el7.remi.x86_64
php72-php-pecl-mcrypt-1.0.1-4.el7.remi.x86_64
php72-php-ldap-7.2.12-1.el7.remi.x86_64
rh-php72-php-pear-1.10.5-1.el7.noarch
sclo-php71-php-mcrypt-7.1.11-1.el7.x86_64
php73-php-process-7.3.0~rc5-1.el7.remi.x86_64
nethserver-rh-php71-php-fpm-1.0.0-1.ns7.noarch
php71-php-ldap-7.1.24-1.el7.remi.x86_64
php73-php-pear-1.10.6-1.el7.remi.noarch
php70-php-cli-7.0.32-1.el7.remi.x86_64
php70-php-imap-7.0.32-1.el7.remi.x86_64
rh-php72-php-common-7.2.10-3.el7.x86_64
rh-php71-php-json-7.1.8-1.el7.x86_64
php72-php-mbstring-7.2.12-1.el7.remi.x86_64
rh-php72-php-pecl-apcu-5.1.12-1.el7.x86_64
php73-php-cli-7.3.0~rc5-1.el7.remi.x86_64
php71-php-common-7.1.24-1.el7.remi.x86_64
php71-php-tidy-7.1.24-1.el7.remi.x86_64
php71-php-gd-7.1.24-1.el7.remi.x86_64
php71-1.0-1.el7.remi.x86_64
php73-1.0-0.1.el7.remi.x86_64
php70-php-fpm-7.0.32-1.el7.remi.x86_64
sclo-php71-php-smbclient-1.0.0-1.el7.x86_64
php72-php-common-7.2.12-1.el7.remi.x86_64
rh-php72-php-fpm-7.2.10-3.el7.x86_64
php72-php-soap-7.2.12-1.el7.remi.x86_64
rh-php72-php-ldap-7.2.10-3.el7.x86_64
php72-php-process-7.2.12-1.el7.remi.x86_64
rh-php72-php-opcache-7.2.10-3.el7.x86_64
php73-php-mbstring-7.3.0~rc5-1.el7.remi.x86_64
rh-php71-php-pecl-apcu-5.1.8-1.el7.x86_64
rh-php71-php-xml-7.1.8-1.el7.x86_64
php71-php-cli-7.1.24-1.el7.remi.x86_64
rh-php71-php-fpm-7.1.8-1.el7.x86_64
php71-php-soap-7.1.24-1.el7.remi.x86_64
sclo-php71-php-pecl-imagick-3.4.4-1.el7.x86_64
php72-php-pear-1.10.6-1.el7.remi.noarch
php71-php-pecl-zip-1.15.4-1.el7.remi.x86_64
php70-php-pdo-7.0.32-1.el7.remi.x86_64
php70-php-mcrypt-7.0.32-1.el7.remi.x86_64
php70-php-process-7.0.32-1.el7.remi.x86_64
rh-php72-runtime-1-2.el7.x86_64
php73-php-common-7.3.0~rc5-1.el7.remi.x86_64
php72-php-cli-7.2.12-1.el7.remi.x86_64
rh-php72-1-2.el7.x86_64
php72-php-bcmath-7.2.12-1.el7.remi.x86_64
php73-php-soap-7.3.0~rc5-1.el7.remi.x86_64
rh-php71-php-opcache-7.1.8-1.el7.x86_64
php71-php-pdo-7.1.24-1.el7.remi.x86_64
php71-php-bcmath-7.1.24-1.el7.remi.x86_64
php71-php-enchant-7.1.24-1.el7.remi.x86_64
php71-runtime-1.0-1.el7.remi.x86_64
php72-runtime-1.0-1.el7.remi.x86_64
php70-php-enchant-7.0.32-1.el7.remi.x86_64
php70-php-xml-7.0.32-1.el7.remi.x86_64
php73-php-json-7.3.0~rc5-1.el7.remi.x86_64
rh-php72-php-json-7.2.10-3.el7.x86_64
rh-php71-php-zip-7.1.8-1.el7.x86_64
php72-php-tidy-7.2.12-1.el7.remi.x86_64
rh-php72-php-xml-7.2.10-3.el7.x86_64
php72-php-imap-7.2.12-1.el7.remi.x86_64
sclo-php72-php-smbclient-1.0.0-1.el7.x86_64
php73-php-gd-7.3.0~rc5-1.el7.remi.x86_64
php73-php-bcmath-7.3.0~rc5-1.el7.remi.x86_64
rh-php71-php-gd-7.1.8-1.el7.x86_64
php71-php-pgsql-7.1.24-1.el7.remi.x86_64
php71-php-mbstring-7.1.24-1.el7.remi.x86_64
sclo-php72-php-pecl-imagick-3.4.4-1.el7.x86_64
php70-runtime-1.0-5.el7.remi.x86_64
php72-php-pecl-zip-1.15.4-1.el7.remi.x86_64
php70-1.0-5.el7.remi.x86_64
php70-php-bcmath-7.0.32-1.el7.remi.x86_64
rh-php72-php-pdo-7.2.10-3.el7.x86_64
php72-php-pgsql-7.2.12-1.el7.remi.x86_64
rh-php72-php-process-7.2.10-3.el7.x86_64
php72-php-xml-7.2.12-1.el7.remi.x86_64
php73-php-fpm-7.3.0~rc5-1.el7.remi.x86_64
rh-php71-php-process-7.1.8-1.el7.x86_64
php73-php-enchant-7.3.0~rc5-1.el7.remi.x86_64
rh-php71-php-pear-1.10.4-1.el7.noarch
php71-php-7.1.24-1.el7.remi.x86_64
php71-php-xml-7.1.24-1.el7.remi.x86_64
php71-php-pear-1.10.6-1.el7.remi.noarch
php70-php-json-7.0.32-1.el7.remi.x86_64
php70-php-mysqlnd-7.0.32-1.el7.remi.x86_64
php70-php-ldap-7.0.32-1.el7.remi.x86_64
php70-php-soap-7.0.32-1.el7.remi.x86_64
rh-php72-php-zip-7.2.10-3.el7.x86_64
php72-php-mysqlnd-7.2.12-1.el7.remi.x86_64
rh-php71-php-common-7.1.8-1.el7.x86_64
php72-php-gd-7.2.12-1.el7.remi.x86_64
nethserver-rh-php72-php-fpm-1.0.0-1.ns7.noarch
rh-php71-php-pdo-7.1.8-1.el7.x86_64
php73-php-xml-7.3.0~rc5-1.el7.remi.x86_64
rh-php71-php-intl-7.1.8-1.el7.x86_64
php73-php-tidy-7.3.0~rc5-1.el7.remi.x86_64
rh-php71-php-ldap-7.1.8-1.el7.x86_64
php71-php-mcrypt-7.1.24-1.el7.remi.x86_64
php71-php-process-7.1.24-1.el7.remi.x86_64
php73-php-pecl-zip-1.15.4-1.el7.remi.x86_64
php72-1.0-1.el7.remi.x86_64
php70-php-tidy-7.0.32-1.el7.remi.x86_64
rh-php72-php-cli-7.2.10-3.el7.x86_64
php72-php-json-7.2.12-1.el7.remi.x86_64
rh-php71-runtime-1-1.el7.x86_64
rh-php72-php-mbstring-7.2.10-3.el7.x86_64
php72-php-fpm-7.2.12-1.el7.remi.x86_64
rh-php72-php-gd-7.2.10-3.el7.x86_64
php73-php-pgsql-7.3.0~rc5-1.el7.remi.x86_64
rh-php71-php-mysqlnd-7.1.8-1.el7.x86_64
php73-php-imap-7.3.0~rc5-1.el7.remi.x86_64
rh-php71-php-mbstring-7.1.8-1.el7.x86_64
php73-php-ldap-7.3.0~rc5-1.el7.remi.x86_64
php71-php-fpm-7.1.24-1.el7.remi.x86_64
php70-php-7.0.32-1.el7.remi.x86_64
php72-php-pdo-7.2.12-1.el7.remi.x86_64
php73-php-mysqlnd-7.3.0~rc5-1.el7.remi.x86_64
rh-php72-php-intl-7.2.10-3.el7.x86_64
rh-php71-1-1.el7.x86_64
php71-php-json-7.1.24-1.el7.remi.x86_64
php71-php-imap-7.1.24-1.el7.remi.x86_64
php70-php-pear-1.10.6-1.el7.remi.noarch
php70-php-common-7.0.32-1.el7.remi.x86_64
php70-php-pgsql-7.0.32-1.el7.remi.x86_64
php70-php-gd-7.0.32-1.el7.remi.x86_64
php73-php-pdo-7.3.0~rc5-1.el7.remi.x86_64
rh-php72-php-mysqlnd-7.2.10-3.el7.x86_64
rh-php71-php-cli-7.1.8-1.el7.x86_64
php72-php-enchant-7.2.12-1.el7.remi.x86_64

the default webserver has php 7.1

Anyone knows how to get the right PHP version or how to get rid of all php and reinstall?

@stephdl, maybe you can help me sove my problem?

Check the nextcloud apache conf, it set the php version

What is the output

php -v

php -v
PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51)
Copyright © 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright © 1998-2013 Zend Technologies

there are two conf files in the /etc/httpd/conf.d folder: nextcloud.conf and zz_nextcloud.conf
nextcloud.conf is emty beside the DO NOT MODIFY THIS FILE paragraph

zz_nextcloud.conf
 # ================= DO NOT MODIFY THIS FILE =================
  2 #
  3 # Manual changes will be lost when this file is regenerated.
  4 #
  5 # Please read the developer's guide, which is available
  6 # at NethServer official site: https://www.nethserver.org
  7 #
  8 #
  9 <VirtualHost *:80>
 10   ServerName nextcloud.nemenz.at
 11   Redirect / https://nextcloud.nemenz.at/
 12 </VirtualHost>
 13
 14 <VirtualHost *:443>
 15   ServerName nextcloud.nemenz.at
 16   SSLEngine on
 17   SSLCertificateFile /etc/pki/tls/certs/localhost.crt
 18   SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
 19   SSLCertificateChainFile /etc/letsencrypt/live/home.nemenz.at/chain.pem
 20   SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5:!SEED:!IDEA
 21
 22   RewriteCond %{HTTPS} !=on
 23   RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
 24
 25   Alias / "/usr/share/nextcloud/"
 26   <Directory "/usr/share/nextcloud">
 27     Options +FollowSymLinks
 28     AllowOverride All
 29     Require all granted
 30
 31     <IfModule mod_dav.c>
 32           Dav off
 33     </IfModule>
 34
 35     <FilesMatch \.php$>
 36           SetHandler "proxy:fcgi://127.0.0.1:9000"
 37     </FilesMatch>
 38
 39     SetEnv HOME /usr/share/nextcloud
 40     SetEnv HTTP_HOME /usr/share/nextcloud
 41     SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
 42   </Directory>
 43
 44   <Directory "/usr/share/nextcloud/data/">
 45       # just in case if .htaccess gets disabled
 46       Require all denied
 47   </Directory>
 48 </VirtualHost>

9000 is the rh-php56-fpm port, IIRC correctly 9002 should be the good port

<FilesMatch \.php$>
  SetHandler "proxy:fcgi://127.0.0.1:9002"
</FilesMatch>

this is what I have when I install nethserver-nextcloud

BTW what isthe output, does it match these versions

rpm -qa | grep nextcloud
nethserver-nextcloud-1.5.1-1.ns7.noarch
nextcloud-16.0.1-1.el7.noarch

please what is the output

config show rh-php72-php-fpm

this is mine

[root@ns7loc11 ~]# config show rh-php72-php-fpm
rh-php72-php-fpm=service
    TCPPorts=9002
    access=
    status=enabled

I suppose that the port is set to 9000

the version seems to match

rpm -qa | grep nextcloud
nethserver-nextcloud-1.5.1-1.ns7.noarch
nextcloud-16.0.1-1.el7.noarch

the version seems to match :

config show rh-php72-php-fpm
rh-php72-php-fpm=service
TCPPorts=9002
access=
status=enabled

I just set the port to 9002, now it looks like it works. thankyou
how comes that there was the wrong entry in the config file? I did not change anything in there, so it was built by the setup

this file is a template, generated automatically, if you want to test if the issue will come again, please

expand-template /etc/httpd/conf.d/zz_nextcloud.conf

then check again the file