Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions public.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/


// Show warning if a PHP version below 5.6.0 is used, this has to happen here
// because base.php will already use 5.6 syntax.
if (version_compare(PHP_VERSION, '5.6.0') === -1) {
echo 'This version of Nextcloud requires at least PHP 5.6.0<br/>';
echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.';
return;
}

// Show warning if PHP 7.2 is used as Nextcloud is not compatible with PHP 7.2 for now
// @see https://github.com/nextcloud/server/pull/5791
if (version_compare(PHP_VERSION, '7.2.0') !== -1) {
echo 'This version of Nextcloud is not compatible with PHP 7.2.<br/>';
echo 'You are currently running ' . PHP_VERSION . '.';
return;
}


try {

require_once __DIR__ . '/lib/base.php';
Expand Down
17 changes: 17 additions & 0 deletions remote.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@
use Sabre\DAV\Exception\ServiceUnavailable;
use Sabre\DAV\Server;

// Show warning if a PHP version below 5.6.0 is used, this has to happen here
// because base.php will already use 5.6 syntax.
if (version_compare(PHP_VERSION, '5.6.0') === -1) {
echo 'This version of Nextcloud requires at least PHP 5.6.0<br/>';
echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.';
return;
}

// Show warning if PHP 7.2 is used as Nextcloud is not compatible with PHP 7.2 for now
// @see https://github.com/nextcloud/server/pull/5791
if (version_compare(PHP_VERSION, '7.2.0') !== -1) {
echo 'This version of Nextcloud is not compatible with PHP 7.2.<br/>';
echo 'You are currently running ' . PHP_VERSION . '.';
return;
}


/**
* Class RemoteException
* Dummy exception class to be use locally to identify certain conditions
Expand Down