- admin_config.php: guard session_start() — was firing Notice because admin_auth.php → session_bridge.php already started the session - includes/menu.php: check mysqli_thread_id() before reusing $db so a closed handle does not cause 'mysqli object is already closed' fatal - admin_invoices.php / admin_payments.php: set $db = null after mysqli_close() so menu.php's reuse-check correctly falls through to opening a fresh connection - adminserverlist.php: use col_exists() to detect missing 'enabled' column in gsp_remote_servers; fall back to constant 1 and display a schema-notice banner; guard UPDATE accordingly; also add missing price_daily / price_year columns to the services SELECT; remove duplicate 'Update Enabled Servers' button - add_remote_server_enabled_column.sql: idempotent migration to add the 'enabled' INT column to gsp_remote_servers on older installs Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/988997ed-7568-48bf-96ef-889fb5d91fec Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| admin_auth.php | ||
| cart_helper.php | ||
| config.example.php | ||
| config.inc.php | ||
| config_loader.php | ||
| footer.php | ||
| log.php | ||
| login_required.php | ||
| menu.php | ||
| panel_bridge.php | ||
| payment_processor.php | ||
| README.md | ||
| session_bridge.php | ||
| top.php | ||
Website Includes Directory
This directory contains configuration and shared files for the standalone _website folder.
config.inc.php
Central database configuration file for the website. This file contains the database connection settings that are used by all website PHP files through the db.php file.
Important: The values in this file should match the panel's database configuration in /includes/config.inc.php to ensure the website can access the same database as the panel.
Configuration Variables
$db_host- Database server hostname$db_user- Database username$db_pass- Database password$db_name- Database name$table_prefix- Table prefix (default: "ogp_")$db_type- Database type (default: "mysql")
Usage
The website files include db.php, which in turn loads this configuration file:
require_once('db.php'); // db.php loads includes/config.inc.php
This centralizes database credentials in one place, making the website easier to configure and maintain as a standalone site.