# Multi-Operator Live Status

For a **multi-op special-event call** on a shared MySQL logbook (e.g. TM74TFR),
OpsLog can publish who is on the air, on which band/mode/frequency, as a live
page you embed on the station's **QRZ.com** bio.

## Enable it

1. Point the profile's logbook at a **shared MySQL** database
   ([[Profiles and Databases]]).
2. **Settings → General → Publish live operator status.**

Each OpsLog instance then heartbeats its current activity (operator call, band,
frequency, mode) into a `live_status` table every ~15 s. OpsLog only **writes**
to the database — it is not a web server.

## The web page

A small PHP renderer, `docs/livestatus/tm74-status.php`, reads that table and
produces a live page/image. Put it on **your own** web server (the one reachable
from the internet):

1. Edit the credentials at the top: `$DB_HOST`, `$DB_PORT`, `$DB_NAME`,
   `$DB_USER`, `$DB_PASS` — pointing at the **same** MySQL as OpsLog's logbook.
2. Embed it on QRZ (QRZ strips `<script>`/`<iframe>`, so use an image):

   ```html
   <img src="https://your-server/tm74-status.php?img=1">
   ```

   or link the real-time page: `https://your-server/tm74-status.php`.

## Troubleshooting the PHP page

- **`Connection refused`** — MySQL is refusing the connection. Most common cause:
  the server's `bind-address` is `127.0.0.1` (localhost only). Set it to the LAN
  IP / `0.0.0.0`, grant the `opslog` user for the web server's IP, and open the
  firewall.
- **Runs on a non-standard MySQL port** — set `$DB_PORT` and pass it as the 5th
  `mysqli` argument (the shipped script already does).
- Redeploy the current `tm74-status.php` if you edited an old copy — the shipped
  version fails gracefully instead of throwing a PHP fatal error.
