Addresses the five bugs found on master (6e139a1b) during a fresh
Docker install and admin testing:
1. Missing `details` column in gold_fin_log (HTTP 500 on finishing
construction with gold, buying Gold Club, admin giving gold):
- Add `details varchar(255)` to the gold_fin_log schema, matching
every INSERT and the a2b2.php reader that already use it.
- Fix the broken positional INSERT in Logging::goldFinLog() (it sent
3 values for a 7-column table) which 500'd on the same gold path.
2. Admin "View Player Info" fatal error: `<? php` -> `<?php` in
Admin/Templates/playerinfo.tpl.
3. "Reset Server" leaving the DB corrupted (Duplicate key name
'idx_ft_bonus_xy'): move the croppers indexes inline into the
CREATE TABLE IF NOT EXISTS so structure recreation is idempotent,
and add `croppers` to the reset truncate list.
4. Install wizard crash on failed DB connection (mysqli_error(false)):
use mysqli_connect_error() and show a friendly, actionable message
(incl. the Docker "db" hostname hint).
5. PHP exposing errors/stack traces to end users: ship a production
php.ini baseline + docker/php/zz-travianz.ini that turns off
display_errors and logs to stderr instead.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Some installations seem to support localhost:port for 1st parameter of
mysqli_connect(), others will only support the official parameters with
port towards the end. This fix tries them both - first the official one,
then the localhost:port one.
Also, there were a lot of mysqli_connect()'s inside Admin mods. These
now also use the central Database class.
A lot has happened here. Here's the list:
1. autoloader was added that should prevent various "failed to open
stream" errors when trying to load new classes
2. PHP-based data generation was replaced by MySQL-based one, hopefully
fixing the installation problems when insert payload it too high and the
DB wouldn't populate with some users
3. thanks to step 2, the installation should be really almost
instantenious, instead of waiting a long time for many SQL connections
and queries to populate the world
4. World Data & Oasis generation and population is done in 1 step now