Files
2026-07-01 12:48:38 -05:00

1.5 KiB

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.