Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"This version of Nextcloud is not compatible with PHP 7.1" #40

Closed
jmhunter opened this issue Mar 3, 2017 · 6 comments
Closed

"This version of Nextcloud is not compatible with PHP 7.1" #40

jmhunter opened this issue Mar 3, 2017 · 6 comments
Assignees

Comments

@jmhunter
Copy link

jmhunter commented Mar 3, 2017

I might be missing something basic, but I can no longer run the nextcloud 9 or 10 docker images (v11 works fine)

I get the following output from my build script (pasted in below). Instead of "php occ upgrade" actually running (in this example it should tell me that Nextcloud is not installed) it says:
This version of Nextcloud is not compatible with PHP 7.1.<br/>You are currently running 7.1.2.

I don't think v9 or v10 support PHP 7.1 ... ? I expect this was introduced as of #34. Sadly I need v9 and v10 in order to perform a migration from OC v8.

build.sh :

#!/bin/sh

if [ "$1" == "" ]; then
        echo Usage: $0 version
        echo e.g. $0 10.0
        exit
fi
NEXTCLOUDVER=$1

if [ -f docker-entrypoint.sh ]; then rm docker-entrypoint.sh; fi
if [ -f Dockerfile ]; then rm Dockerfile; fi

wget https://github.com/nextcloud/docker/raw/master/${NEXTCLOUDVER}/apache/docker-entrypoint.sh https://github.com/nextcloud/docker/raw/master/${NEXTCLOUDVER}/apache/Dockerfile
chmod +x docker-entrypoint.sh

# Stop any running nextcloud instances (any)
docker ps | grep nextcloud-test- | tr -s ' ' | cut -f 2 -d ' ' | xargs -n 1 docker stop

# Remove the old instance before we rebuild it
docker rm nextcloud-test-${NEXTCLOUDVER}

docker build -t nextcloud-test-${NEXTCLOUDVER} . && \
docker run --name nextcloud-test-${NEXTCLOUDVER} \
        -d \
        -p 127.0.0.1:8081:80 \
        nextcloud-test-${NEXTCLOUDVER}

docker exec -it nextcloud-test-${NEXTCLOUDVER} bash -c "apt-get update && apt-get install -y sudo vim"

# This will fail:
docker exec -it nextcloud-test-${NEXTCLOUDVER} bash -c "sudo -u www-data php occ upgrade"

@pierreozoux
Copy link
Member

Really sorry for this, we would need tests in this repo, would help a lot.

I'll review #42

@rokups
Copy link

rokups commented Apr 4, 2017

This is weird because i experience exact opposite. v10 runs just fine but v11 docker image from dockerhub throws this error. How can this be? I checked files in commit tagged with 11.0.2 and it contains fix.

@pbauerochse
Copy link

After upgrading to 11-fpm I get the exact same error. Maybe the Dockerfile for version 11 also needs a backport to PHP 5.6?

Any hints how I can resolve this on my own are appreciated.

@SnowMB
Copy link
Contributor

SnowMB commented Apr 18, 2017

@pbauerochse

Beware that just pulling the new docker image, does not upgrade your installation of nextcloud. (See discussion in #23)

So when you just pull the new docker image you get all the new dependencies, but the source files are not replaced by the new ones, which could result in this error.

There is work on a fix: #65

How to fix your current situation:
The entrypoint script checks for the version.php file. If you delete it, the new source code is copied to the /var/www/html folder. First you need to find the volume where your installation is stored

docker inspect your_nextcloud_fpm_container

Search for:

...
"Mounts": [
            {
                "Type": "volume",
                "Name": "df2dac95050bf201cc0da94094e33d7d2a064b94ebb028478dd196063cfcab7b",
                "Source": "/var/lib/docker/volumes/df2dac95050bf201cc0da94094e33d7d2a064b94ebb028478dd196063cfcab7b/_data",
                "Destination": "/var/www/html",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },

Then remove version.php from the volume container (replace xxx with the name of the volume):

docker run --rm -v df2dac95050bf201cc0da94094e33d7d2a064b94ebb028478dd196063cfcab7b:/nextcloud alpine rm /nextcloud/version.php

And restart your nextcloud container.

@pbauerochse
Copy link

Thanks for the explanation and guide how to resolve this issue. It works perfectly!

@mbharanya
Copy link

I had the same issue after upgrading to 16.0.3.
My config folder is mounted as a volume, and I deleted version.php.

After restarting I still get the same error, and version.php wasn't recreated either.
Thankful for any pointers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants