Skip to content

DB379/RegisterTrinityCore3.3.5a

Repository files navigation

TrinityCore 3.3.5a PHP Registration Script

Simple and secure registration page for TrinityCore 3.3.5a servers with correct SRP6 authentication support.

Features

  • SRP6 Authentication: Correctly handles salt/verifier calculation (Little Endian, 32-byte salt).
  • GM Account Creation: Optional checkbox to create Tier 3 (Admin) accounts immediately.
  • Input Validation: Secure validation for username, password, and email.

Preview

Register Page Preview Modern, dark-themed registration page.

Requirements

  • PHP: 7.4 or 8.x
  • Extensions:
    • pdo_mysql (Database connection)
    • gmp (Crucial for SRP6 calculation)
    • mbstring (Recommended)

Configuration

The database connection settings are located in register-config.php. You can edit them directly or use Environment Variables.

Variable Default Description
DB_HOST localhost Database IP or Hostname
DB_USER trinity Database Username
DB_PASS trinity Database Password
DB_NAME auth Auth Database Name
DB_PORT 3306 MySQL Port

Installation Guide

1. Docker (Recommended)

This project includes a fully configured docker-compose.yml.

  1. Install Docker Desktop.
  2. Open terminal in the project folder.
  3. Run:
    docker compose up -d --build
  4. Access the page at http://localhost:8080.

Note: Ensure your MySQL container or external database is reachable from inside the container. You might need to adjust DB_HOST in docker-compose.yml (e.g., set it to host.docker.internal to access localhost of the host machine).

2. XAMPP (Windows)

  1. Download and install XAMPP.
  2. Start the Apache and MySQL modules.
  3. Enable GMP Extension:
    • Open the XAMPP Control Panel.
    • Click Config next to Apache -> PHP (php.ini).
    • Search for ;extension=gmp.
    • Remove the semicolon (;) to uncomment it: extension=gmp.
    • Save the file and Restart Apache.
  4. Copy the project files into C:\xampp\htdocs\register.
  5. Edit register-config.php with your MySQL credentials.
  6. Access at http://localhost/register.

3. WAMP Server (Windows)

  1. Download and install WAMP.
  2. Left-click the WAMP icon in the system tray.
  3. Go to PHP -> PHP Extensions.
  4. Ensure php_gmp is checked (click it if it's not).
  5. Copy project files to C:\wamp64\www\register.
  6. Edit register-config.php with your credentials.
  7. Access at http://localhost/register.

4. Linux (Apache/Nginx)

  1. Install PHP and extensions:
    sudo apt update
    sudo apt install php php-gmp php-mysql
  2. Place files in /var/www/html.
  3. Configure register-config.php.
  4. Ensure permissions are correct.

Troubleshooting

"Call to undefined function gmp_init()"

This means the GMP extension is not enabled in PHP. Follow the "Enable GMP Extension" steps for your platform (XAMPP/WAMP guides above).

Database Connection Failed

  • Check your credentials in register-config.php.
  • Ensure the mysql user has permissions to access the auth database.

Login Failed In-Game

  • Ensure you created a NEW account with this script. Old accounts created with broken scripts will not work.
  • Check realmlist table in your auth database to ensure the realm address matches your realmlist.wtf.

About

Register page for TrinityCore 3.3.5a branch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors