README/Conf

* check for presence of lib GMP when trying to enable TC auth
 * also added missing requirement to README (thx @jackpoz for reminding me)
This commit is contained in:
Sarjuuk 2020-08-03 22:07:07 +02:00
parent 726fe90bb0
commit 3e24814518
4 changed files with 29 additions and 5 deletions

View file

@ -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!

View file

@ -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.<br />';
return false;
}
return true;
};
break;
default: // nothing to do, everything is fine
return true;
}

View file

@ -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))

View file

@ -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;
}