1
0

versioncheck.php 686 B

123456789101112131415161718
  1. <?php
  2. // Show warning if a PHP version below 5.6.0 is used, this has to happen here
  3. // because base.php will already use 5.6 syntax.
  4. if (version_compare(PHP_VERSION, '5.6.0', '<')) {
  5. http_response_code(500);
  6. echo 'This version of Nextcloud requires at least PHP 5.6.0<br/>';
  7. echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.';
  8. exit(-1);
  9. }
  10. // Show warning if > PHP 7.1 is used as Nextcloud 12 is not compatible with > PHP 7.1
  11. if (version_compare(PHP_VERSION, '7.2.0', '>=')) {
  12. http_response_code(500);
  13. echo 'This version of Nextcloud is not compatible with > PHP 7.2.<br/>';
  14. echo 'You are currently running ' . PHP_VERSION . '.';
  15. exit(-1);
  16. }