安装TrinityCore wow服务器注册管理软件WoWSimpleRegistration-2:解决图片显示和多区问题

WoWSimpleRegistration官网:

GitHub - masterking32/WoWSimpleRegistration: Simple Registration page for TrinityCore/AzerothCore/AshamaneCore/CMangos

WoWSimpleRegistration支持TrinityCore和AzerothCore,安装方法见:Nginx配置php起TrinityCore WoWSimpleRegistration服务-CSDN博客

但是前面安装好后,只能说能进行注册和改密码,还有两个问题没有解决:1是角色图片无法显示 2是没有显示多区realm

于是在安装好后,继续调试WoWSimpleRegistration

解决角色图片无法显示

原来需要修改WoWSimpleRegistration的配置文件config.php文件,该文件路径application/config/config.php:

修改文件中这句//$config['baseurl'] = "http://localhost"; //  Must be a valid URL to prevent issues with loading images and templates.

将里面的localhost替换成最终浏览器浏览时的域名,注意,如果web不是80端口而是有其它端口号,如8084,那么配置中也要带端口号。

修改后角色图片无法显示的问题解决,同时整个Web页面都有了配图,网站漂亮很多。

配置显示多区realm

修改config.php文件中的realm部分,参考后面的例子代码添加realm2的信息:

$config['realmlists'] = array(
    "1" => array(
        'realmid' => 1, // Realm ID
        'realmname' => "Realm 1", // Realm Name
        'db_host' => "127.0.0.1", // MySQL Host IP
        'db_port' => "3306", // MySQL Host Port
        # 'db_user' => "root", // MySQL username
        # 'db_pass' => 'root', // MySQL password
        'db_name' => "characters" // Characters database name
    ),
      "2" => array(
        'realmid' => 2, // Realm ID
        'realmname' => "Realm 2", // Realm Name
        'db_host' => "192.168.1.12", // MySQL Host IP
        'db_port' => "3306", // MySQL Host Port
        # 'db_user' => "root", // MySQL username
        # 'db_pass' => 'root', // MySQL password
        'db_name' => "characters" // Characters database name
    )

注意这里的db_host需要填写第二个区characters数据库所在服务器的ip,而不是auth服务器的ip。

第一次修改后显示报错:

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1044] Access denied for user 'trinity'@'192.168.1.2' to database 'characters' in /var/WoWSimpleRegistration/application/vendor/catfan/medoo/src/Medoo.php:478 Stack trace: #0 /var/WoWSimpleRegistration/application/include/database.php(30): Medoo\Medoo->__construct() #1 /var/WoWSimpleRegistration/application/loader.php(84): database::db_connect() #2 /var/WoWSimpleRegistration/index.php(32): require_once('...') #3 {main} thrown in /var/WoWSimpleRegistration/application/vendor/catfan/medoo/src/Medoo.php on line 478

原来是没有把'trinity'@'192.168.1.2'对characters的权限放开,去放开权限:

mysql> GRANT ALL PRIVILEGES ON characters.* TO 'trinity'@'192.168.1.2' WITH GRAN
T OPTION;
Query OK, 0 rows affected (0.01 sec)
放开权限后,能看到加上的第二个区的信息。

这样整个Web网站基本搞定。

现在还剩下email部分没有搞定,留待以后再解决。 

  • 28
    点赞
  • 28
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
-- Detected 64-bit platform -- UNIX: Configuring uninstall target -- UNIX: Created uninstall target -- UNIX: Using default system linker -- UNIX: Detected compiler: /usr/bin/cc -- Clang: Minimum version required is 7.0.0, found 14.0.0 - ok! -- Using mysql-config: /usr/bin/mysql_config -- Found MySQL library: /usr/lib/x86_64-linux-gnu/libmysqlclient.so -- Found MySQL headers: /usr/include/mysql -- Found MySQL executable: /usr/bin/mysql fatal: 不是 git 仓库(或者任何父目录):.git CMake Error at cmake/genrev.cmake:116 (string): string sub-command REGEX, mode MATCH needs at least 5 arguments total to command. Call Stack (most recent call first): CMakeLists.txt:83 (include) * TrinityCore revision : + (+ branch) * TrinityCore buildtype : RelWithDebInfo * Install core to : /home/wow/server3.5.5 * Install configs to : /home/wow/server/etc * Build world/auth : Yes (default) * Build with scripts : Yes (static) * Build map/vmap tools : Yes (default) * Build unit tests : No (default) * Build core w/PCH : Yes (default) * Build scripts w/PCH : Yes (default) * Show compile-warnings : No (default) * Use coreside debug : No (default) * Show source tree : Yes (hierarchical) * Use GIT revision hash : Yes (default) -- Found OpenSSL library: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so -- Found OpenSSL headers: /usr/include CMake Error at cmake/macros/FindOpenSSL.cmake:579 (message): TrinityCore needs OpenSSL version 1.0 but found too new version 3.0.2. TrinityCore needs OpenSSL 1.0.x or 1.1.x to work properly. If you still have problems please install OpenSSL 1.0.x if you still have problems search on forum for TCE00022 Call Stack (most recent call first): dep/openssl/CMakeLists.txt:16 (find_package) -- Configuring incomplete, errors occurred! See also "/home/wow/TrinityCore/TrinityCore-TDB335.22061/build/CMakeFiles/CMakeOutput.log". See also "/home/wow/TrinityCore/TrinityCore-TDB335.22061/build/CMakeFiles/CMakeError.log".
05-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值