diff --git a/README.md b/README.md index 7580c84a..c5df1aa3 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,12 @@ Also, this project is not meant to be used for commercial puposes of any kind! ## Requirements + Webserver running PHP ≥ 7.1 including extensions: - + SimpleXML - + GD - + Mysqli - + mbString + + [SimpleXML](https://www.php.net/manual/en/book.simplexml.php) + + [GD](https://www.php.net/manual/en/book.image) + + [MySQL Improved](https://www.php.net/manual/en/book.mysqli.php) + + [Multibyte String](https://www.php.net/manual/en/book.mbstring.php) + + [File Information](https://www.php.net/manual/en/book.fileinfo.php) + + [GNU Multiple Precision](https://www.php.net/manual/en/book.gmp.php) (When using TrinityCore as auth source) + MySQL ≥ 5.5.30 + [TDB 335.20071](https://github.com/TrinityCore/TrinityCore/releases/tag/TDB335.20071) including updates up to [TrinityCore/TrinityCore@fb2ab8f](https://github.com/TrinityCore/aowow/commit/fb2ab8f61320a7afda96322cca64e0034f174309) + If you are using TrinityCores auth and need time to transition, use the branch *sha1-auth* in the meantime! diff --git a/includes/ajaxHandler/admin.class.php b/includes/ajaxHandler/admin.class.php index 3f55f7f2..5e26a1b3 100644 --- a/includes/ajaxHandler/admin.class.php +++ b/includes/ajaxHandler/admin.class.php @@ -526,6 +526,17 @@ class AjaxAdmin extends AjaxHandler return Profiler::queueStart($msg); }; break; + case 'acc_auth_mode': + $fn = function($x) use (&$msg) { + if ($x == 1 && !extension_loaded('gmp')) + { + $msg .= 'PHP extension GMP is required to use TrinityCore as auth source, but is not currently enabled.
'; + return false; + } + + return true; + }; + break; default: // nothing to do, everything is fine return true; } diff --git a/includes/shared.php b/includes/shared.php index 62d008e3..a6586514 100644 --- a/includes/shared.php +++ b/includes/shared.php @@ -4,7 +4,7 @@ define('AOWOW_REVISION', 31); define('CLI', PHP_SAPI === 'cli'); -$reqExt = ['SimpleXML', 'gd', 'mysqli', 'mbstring', 'fileinfo']; +$reqExt = ['SimpleXML', 'gd', 'mysqli', 'mbstring', 'fileinfo'/*, 'gmp'*/]; $error = ''; foreach ($reqExt as $r) if (!extension_loaded($r)) diff --git a/setup/tools/clisetup/siteconfig.func.php b/setup/tools/clisetup/siteconfig.func.php index e68c8464..193198c7 100644 --- a/setup/tools/clisetup/siteconfig.func.php +++ b/setup/tools/clisetup/siteconfig.func.php @@ -59,6 +59,17 @@ function siteconfig() return $ok; }; break; + case 'acc_auth_mode': + $fn = function($x) { + if ($x == 1 && !extension_loaded('gmp')) + { + CLI::write('PHP extension GMP is required to use TrinityCore as auth source, but it is currently not enabled.', CLI::LOG_ERROR); + return false; + } + + return true; + }; + break; default: // nothing to do, everything is fine return true; }