# Deploying PQS on XAMPP Lite 8.5 (on-demand) PQS is designed to run from a **portable XAMPP Lite 8.5** stack (PHP 8.5 + MariaDB + Apache) so the whole system can be stood up on demand at a venue with no internet. This folder holds the one-shot database installer. ## Steps 1. **Drop the app into htdocs.** Copy the PQS folder to: ``` xampp\htdocs\pqs ``` (The app uses `/pqs/...` URLs, so the folder must be named `pqs`.) 2. **Start Apache and MySQL** from the XAMPP control panel. 3. **Create the database.** From `xampp\mysql\bin` (XAMPP's MariaDB root has no password by default): ``` mysql -u root < ..\..\htdocs\pqs\install\pqs_install.sql ``` Or in phpMyAdmin (http://localhost/phpmyadmin) → Import → choose `install\pqs_install.sql`. This creates the `pqs` database, the `pqs`/`pqs` application user, every table (all InnoDB), and the static seed data (mechs, maps, game types, default game config, pod layout). Queue/mission/history start empty. It is safe to re-run; to wipe clean, `DROP DATABASE pqs` first. 4. **Open the app:** | Screen | URL | |--------|-----| | Registration kiosk | http://localhost/pqs/callsign.php | | Registration console | http://localhost/pqs/registration.php | | Game/ops console | http://localhost/pqs/console.php | | Queue wall | http://localhost/pqs/combinedqueue.php | That's it — no build step, no internet. ## Notes - **Credentials.** The app connects as `pqs`/`pqs` on `localhost` (see `includes/db.php`). These are a formality on an air-gapped LAN. - **Timezone.** Set once in `includes/db.php` (`PQS_TIMEZONE`, default `America/Chicago`). Change it there. - **PHP target.** Code targets PHP 7.4+; XAMPP Lite 8.5 ships PHP 8.5. Tested on PHP 8.3 / MariaDB (see `dev/`). - **`time.php` (optional clock sync).** Sets the machine clock from the browser for the air-gapped box. On Windows it uses PowerShell `Set-Date`, which only works if Apache is **running as administrator**. If the host clock is already correct you don't need this. ## Fresh install vs. upgrading an existing DB - **Fresh XAMPP deploy →** use `install/pqs_install.sql` (this folder). It already creates every table as InnoDB, so no migrations are needed. - **Upgrading a pre-existing (older MyISAM) database →** run the incremental `dev/migrations/001-*.sql` and `002-*.sql` instead, which convert the affected tables to InnoDB in place.