Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/4b32e3c2-afec-458b-bf16-48e58045cc8b Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
3.9 KiB
GSP Installer – Differences from Original OGP install.php
Overview
install.php in this repository is a customized installer for the
GSP (Game Server Panel) maintained by WDS. It is based on the original
OGP installer at
https://github.com/OpenGamePanel/OGP-Website/blob/master/install.php
but has been adapted for the GSP/WDS environment.
Key differences
1. Default table prefix: gsp_
The original OGP installer defaults to ogp_. Our installer defaults to
gsp_ (the $table_prefix form field pre-fills with gsp_). You may
change this during installation.
2. Config file now includes $db_port
The generated includes/config.inc.php includes a $db_port variable:
$db_host="HOST";
$db_port="3306";
$db_user="USER";
$db_pass="PASSWORD";
$db_name="DATABASE";
$table_prefix="gsp_";
$db_type="mysql";
Existing config files that predate this installer and lack $db_port
continue to work because the parameter defaults to NULL (MySQL default
port 3306).
3. MySQLi connection uses the port
includes/database_mysqli.php – OGPDatabaseMySQL::connect() – now
accepts an optional $db_port argument and passes it to mysqli_connect():
$this->link = mysqli_connect($db_host, $db_user, $db_pass, $db_name, $port);
includes/helpers.php – createDatabaseConnection() – likewise accepts
and forwards $db_port.
All panel entry points (home.php, index.php, ogp_api.php,
server_status.php, modules/billing/cron-shop.php,
modules/billing/includes/panel_bridge.php) pass
isset($db_port) ? $db_port : NULL when calling
createDatabaseConnection().
4. Default admin account created automatically
After modules are installed, the installer automatically creates an admin
account with password admin using the existing OGPDatabaseMySQL::addUser()
method (which stores passwords as MD5). If an admin user already exists it
is not duplicated.
Change the default password immediately after your first login.
5. No prerequisite checks
Step 0 shows a welcome screen and language selector only. The original OGP installer checks for required PHP extensions, Pear, etc. GSP skips those checks because the deployment environment is pre-validated by our bootstrap scripts.
6. All modules installed automatically
Every directory found under modules/ is installed via
install_module(). Prerequisite failures for individual modules are treated
as warnings (not hard failures) so that the overall installation succeeds
even if optional dependencies are missing.
7. ogp_ → gsp_ table migration (optional, safe)
If the database already contains tables prefixed with ogp_:
- For each
ogp_Xtable, if the correspondinggsp_Xtable does not exist, it is renamed togsp_X. - If
gsp_Xalready exists, the rename is skipped silently. - The installer never aborts due to pre-existing tables.
This allows upgrading an existing OGP installation to GSP without losing data.
8. Branding
The installer title and default site settings reference GSP – Game Server Panel and WDS instead of "Open Game Panel".
Running the installer
- Upload/deploy the panel files.
- Ensure
includes/config.inc.phpis writable (or does not exist yet). - Open
https://yoursite/install.phpin a browser. - Select your language and click Next.
- Enter database credentials and click Next.
- The installer writes config, migrates tables (if needed), installs modules, and creates the default admin account.
- Delete
install.phpfrom the server after installation. - Optionally
chmod 644 includes/config.inc.phpfor security.
Rollback
- To re-run the installer, simply navigate to
install.phpagain. - If the wrong prefix was chosen, edit
includes/config.inc.phpmanually or re-runinstall.php. - Renamed (
ogp_→gsp_) tables can be manually renamed back withRENAME TABLE gsp_X TO ogp_Xin MySQL.