Skip to content
Merged
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
22 changes: 0 additions & 22 deletions console.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,6 @@

\define('OC_CONSOLE', 1);

// Show warning if a PHP version below 7.4.0 is used, this has to happen here
// because base.php will already use 7.4 syntax.
if (\version_compare(PHP_VERSION, '7.4.0') === -1) {
echo 'This version of ownCloud requires at least PHP 7.4.0'.PHP_EOL;
echo 'You are currently running PHP ' . PHP_VERSION . '. Please update your PHP version.'.PHP_EOL;
exit(1);
}

// Show warning if PHP 8.0 or later is used as ownCloud is not compatible with PHP 8.0
if (\version_compare(PHP_VERSION, '8.0.0') !== -1) {
echo 'This version of ownCloud is not compatible with PHP 8.0' . PHP_EOL;
echo 'You are currently running PHP ' . PHP_VERSION . '.' . PHP_EOL;
exit(1);
}

// running oC on Windows is unsupported since 8.1, this has to happen here because
// is seems that the autoloader on Windows fails later and just throws an exception.
if (\stripos(PHP_OS, 'WIN') === 0) {
echo 'ownCloud Server does not support Microsoft Windows.';
exit(1);
}

function exceptionHandler($exception) {
try {
// try to log the exception
Expand Down
22 changes: 0 additions & 22 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,6 @@
*
*/

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

// Show warning if PHP 8.0 or later is used as ownCloud is not compatible with PHP 8.0
if (\version_compare(PHP_VERSION, '8.0.0') !== -1) {
echo 'This version of ownCloud is not compatible with PHP 8.0<br/>';
echo 'You are currently running PHP ' . PHP_VERSION . '.';
return;
}

// running oC on Windows is unsupported since 8.1, this has to happen here because
// is seems that the autoloader on Windows fails later and just throws an exception.
if (\stripos(PHP_OS, 'WIN') === 0) {
echo 'ownCloud Server does not support Microsoft Windows.';
return;
}

try {
require_once __DIR__ . '/lib/base.php';
OC::handleRequest();
Expand Down
Loading