From b8af7ee9bc9badb76bbf8d7eb4ff9dcc8744ba6c Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 13 Oct 2017 21:30:29 +0200 Subject: Nextcloud 13 is not compatible with newer than php 7.2 Just to avoid users from trying this with a to new (untested) php version * Moved the check logic to 1 place * All directly callable scripts just require this on top * exit hard (-1) so we know scripts won't continue * Return status 500 so no sync clients will try fancy stuff Signed-off-by: Roeland Jago Douma --- lib/versioncheck.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/versioncheck.php (limited to 'lib/versioncheck.php') diff --git a/lib/versioncheck.php b/lib/versioncheck.php new file mode 100644 index 00000000000..23b09c28e14 --- /dev/null +++ b/lib/versioncheck.php @@ -0,0 +1,18 @@ +'; + echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.'; + exit(-1); +} + +// Show warning if > PHP 7.2 is used as Nextcloud is not compatible with > PHP 7.2 for now +if (version_compare(PHP_VERSION, '7.3.0') !== -1) { + http_response_code(500); + echo 'This version of Nextcloud is not compatible with > PHP 7.2.
'; + echo 'You are currently running ' . PHP_VERSION . '.'; + exit(-1); +} -- cgit v1.2.3