versioncheck.php 726 B

12345678910111213141516171819202122
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. // Show warning if a PHP version below 8.1 is used,
  8. if (PHP_VERSION_ID < 80100) {
  9. http_response_code(500);
  10. echo 'This version of Nextcloud requires at least PHP 8.1<br/>';
  11. echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.';
  12. exit(1);
  13. }
  14. // Show warning if >= PHP 8.4 is used as Nextcloud is not compatible with >= PHP 8.4 for now
  15. if (PHP_VERSION_ID >= 80400) {
  16. http_response_code(500);
  17. echo 'This version of Nextcloud is not compatible with PHP>=8.4.<br/>';
  18. echo 'You are currently running ' . PHP_VERSION . '.';
  19. exit(1);
  20. }