Files
CydandClaude Opus 4.8 5aa01db123 Parameterize console.php; make Commit Mission atomic
- Config 'Update', 'Commit Mission', lock, and clearupdate now use db.php
  helpers with bound params (were injectable via ~20 raw $_GET values incl.
  nummercs and playerid). Pod toggles collapsed into a 16-iteration loop.
- Commit Mission runs under the shared queue lock and one transaction so a
  registration can't slip into the mission mid-commit.
- dev/migrations/002: pqs_currentmission + pqs_pastmissions -> InnoDB so the
  commit's snapshot/archive roll back with the queue delete (uses DELETE not
  TRUNCATE to stay in the transaction).

Verified: commit moves players to current/past, empties queue, marks completed
with nummercs; config update writes pods + settings; no errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:59:27 -05:00
..

dev/ — local test environment

Tooling to run PQS locally for testing, not part of the deployed app.

The venue server is Debian + PHP + MySQL. The closest local mirror on this machine is WSL2 Ubuntu, so we test there.

First-time setup

From a WSL Ubuntu shell, in the repo root:

bash dev/setup-local.sh

This installs php-cli, php-mysql, and mariadb-server, creates the pqs database + pqs/pqs user, and loads docs/pqs.sql. You'll be asked for your sudo password. It's idempotent — safe to re-run.

Running the app

# serve the PARENT of the repo so the app's hardcoded /pqs/ URLs resolve
php -S 0.0.0.0:8080 -t /mnt/c/VWE

Then browse:

Notes / caveats

  • PHP version differs from the venue. Ubuntu 24.04 ships PHP 8.3; the venue box was PHP 5.4. We keep application code compatible with 5.5+ so it runs in both, but PHP 8 is stricter — the legacy mysql_* calls in the original code will fatal here until they're replaced (which is part of the improvement plan).
  • MariaDB stands in for MySQL 5.5. Fine for our purposes: InnoDB, transactions, and the SQL this app uses are all equivalent.
  • After a WSL restart the DB is stopped; run sudo service mariadb start.
  • This is a throwaway DB with no real player data.