TravianZ Patcher 7a013c38e3 Fix install + admin bugs reported in issue #169
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>
2026-06-03 08:32:00 +02:00
2026-05-28 12:25:28 +03:00
2026-05-28 12:25:28 +03:00
Fix
2026-06-02 14:20:21 +03:00
2026-05-07 08:24:40 +03:00
2026-05-07 08:24:40 +03:00
Fix
2026-06-02 14:20:21 +03:00
2025-11-12 21:29:11 +03:00
2013-06-16 10:38:34 +03:00
2026-04-28 10:19:50 +03:00
2026-05-25 10:23:39 +03:00
2013-06-16 10:38:34 +03:00
2026-04-28 10:19:50 +03:00
2026-04-28 10:19:50 +03:00
2026-04-28 10:19:50 +03:00
2026-04-28 10:19:50 +03:00
2026-04-30 08:55:00 +03:00
2026-04-28 10:19:50 +03:00
2026-04-28 10:19:50 +03:00
2026-04-28 10:19:50 +03:00
2026-04-28 10:19:50 +03:00
2026-04-29 15:20:55 +03:00
2017-11-20 13:55:58 +02:00
2017-11-21 02:03:54 +01:00
2026-06-02 12:58:20 +03:00
2026-04-29 15:20:55 +03:00
2026-04-29 15:20:55 +03:00
2026-04-29 15:20:55 +03:00
2013-06-16 10:38:34 +03:00
2020-07-25 09:33:56 -04:00
2026-04-29 15:20:55 +03:00
2017-11-21 01:53:26 +01:00
2026-04-29 15:20:55 +03:00
2026-04-29 15:20:55 +03:00
2017-11-20 13:53:34 +02:00
2026-04-30 08:55:00 +03:00
2026-04-29 15:20:55 +03:00
2026-05-25 10:23:39 +03:00
2026-04-29 15:20:55 +03:00
2013-06-16 10:38:34 +03:00
2013-06-16 10:38:34 +03:00
2013-06-16 10:38:34 +03:00
2026-04-29 15:20:55 +03:00
2017-11-03 15:52:29 +01:00
2026-04-29 15:20:55 +03:00
2026-04-29 15:20:55 +03:00
2024-10-09 17:48:39 +03:00
2026-04-29 15:20:55 +03:00
2026-05-15 08:17:14 +03:00
2026-04-29 15:20:55 +03:00
2026-04-29 15:20:55 +03:00
2026-04-29 15:20:55 +03:00
2026-04-29 15:20:55 +03:00
2026-04-29 15:20:55 +03:00
2026-06-02 12:04:31 +03:00
2013-06-16 10:38:34 +03:00
2026-04-29 15:20:55 +03:00
2025-10-24 23:27:04 +03:00
2026-04-29 15:20:55 +03:00
2026-04-30 08:55:00 +03:00

TravianZ

Maintenance GitHub Release GitHub contributors license

TravianZ is an open-source browser strategy game inspired by classic Travian-like gameplay.

This repository currently targets modern local/server setups with PHP 8.x and MariaDB.

Project Status

  • Version line: v9 (Incremental Refactor)
  • Stability: playable and actively maintained
  • Migration note: this is not a drop-in upgrade over older 8.3.4 deployments

If you are upgrading from an older installation, do a fresh install and migrate data carefully.

Quick Start (Docker)

git clone https://github.com/Shadowss/TravianZ.git
cd TravianZ
cp .env.example .env
docker compose up -d

Then open:

  • http://localhost:8080/install

Detailed container guide: DOCKER_README.md

System Requirements

Recommended:

  • PHP 8.3+
  • MariaDB latest stable (or MySQL-compatible server)
  • Apache or Nginx with PHP support
  • Linux server with enough CPU/RAM for your expected player count

Notes:

  • The game is query-heavy by design (legacy architecture), so shared hosting can become a bottleneck quickly.
  • For medium/large servers, prefer dedicated or well-sized VPS infrastructure.

Installation (Web Installer)

  1. Start services (Docker) or prepare your web+DB stack.
  2. Open http://your-host/install.
  3. Fill database settings:
  • Host: db (Docker) or your DB host
  • Port: usually 3306
  • DB/User/Password from your environment
  1. Complete installer steps:
  • DB structure
  • World data
  • Croppers build
  1. After success, access the game root.

Environment Configuration

Use .env (copy from .env.example) to manage deployment values.

Main keys:

  • MARIADB_ROOT_PASSWORD
  • MARIADB_DATABASE
  • MARIADB_USER
  • MARIADB_PASSWORD
  • DB_HOST
  • DB_PORT

Legacy compatibility keys (MYSQL_*) are still supported and can inherit MariaDB values.

Admin Panel

Admin entrypoint:

  • http://your-host/Admin/admin.php

Recent improvements include:

  • Full incremental refactored GameEngine and Templates folder
  • Added cache on Database.php and Automation.php and other important files
  • Dynamic table prefix support in map tile queries

Performance Notes

For large worlds (for example 400x400), generation tasks can be expensive.

Recent optimizations include:

  • world data generation tuning for bulk operations
  • croppers generation batching and progress streaming
  • safer DB/session handling during installer workflows

For production-like loads, monitor:

  • DB CPU and slow queries
  • PHP-FPM/Apache worker limits
  • disk I/O during installer and reset operations

Troubleshooting

Common checks:

  1. If installer cannot connect to DB:
  • verify DB_HOST, port, user and password
  • in Docker, host should be db, not localhost
  1. If permissions fail during install:
  • ensure web user can write required runtime files/folders
  1. If pages show warnings after PHP upgrade:
  • ensure latest code is deployed
  • clear opcode/cache and retry

For container-specific troubleshooting, see DOCKER_README.md.

Development

Useful commands:

# Start stack
docker compose up -d

# Logs
docker compose logs -f web

# Validate PHP files
find . -name '*.php' -not -path './var/*' -print0 | xargs -0 -n1 php -l

Repository references:

Community and Support

Credits

Thanks to the original and current maintainers, contributors, testers, and the TravianZ community.

Special acknowledgement to all legacy authors and maintainers who kept this project alive through multiple iterations.

License

This project is licensed under the terms described in LICENSE.

Languages
PHP 44.8%
Go Template 43.4%
CSS 8%
JavaScript 3.5%
HTML 0.2%