Files
PQS/install/README.md
T
CydandClaude Opus 4.8 b491bb4b8a Add on-demand XAMPP Lite 8.5 installer + Windows time.php support
- install/pqs_install.sql: one-shot installer (creates pqs DB + user, all
  tables as InnoDB, static seed) so a fresh portable XAMPP deploy needs no
  separate migrations. Derived from docs/pqs.sql with engines forced to InnoDB.
- install/README.md: XAMPP Lite 8.5 deployment steps plus fresh-vs-upgrade guidance.
- time.php: OS-aware clock set (PowerShell Set-Date on Windows/XAMPP, sudo date
  on Linux); epoch is int-cast so the exec has no injection.
- .gitignore: exclude the portable xampp_lite_8_5/ stack (not versioned here).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 15:08:09 -05:00

60 lines
2.4 KiB
Markdown

# 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.