1 Installation
stak administrator edited this page 2026-09-10 11:41:56 +00:00

Installation

Requirements

  • XAMPP (or any Apache + PHP + MySQL stack) with mod_rewrite and mod_authz_core enabled — both are active by default in XAMPP
  • PHP 8.0 or newer (uses typed properties/return types, ??=-style null coalescing, etc.)
  • A MySQL/MariaDB database

Steps

  1. Copy the project into your htdocs folder, e.g. C:\xampp\htdocs\my-app. The folder name is completely free to choose — the app detects its own base path automatically (see Architecture).

  2. Start Apache and MySQL in the XAMPP control panel.

  3. Create a database, e.g. via phpMyAdmin:

    CREATE DATABASE meine_datenbank;
    
  4. Import the schema. Open phpMyAdmin, select the new database, and import sql/database.sql. This single file creates the user table with all roles and columns.

  5. Configure the connection. Edit config/database.php and set $DB_HOST, $DB_NAME, $DB_USER, $DB_PASS to match your environment.

  6. Check .htaccess support. Make sure AllowOverride All is set for the htdocs directory in your Apache config, otherwise the rewrite rules in .htaccess (and the "deny direct access" rules in app/, config/, includes/, pages/, sql/) won't be applied.

  7. Create the first administrator. Every self-registered account starts with the pending role, so at least one admin account must be created manually:

    • Open in your browser: http://localhost/<your-folder>/tools/generate_hash.php?pw=yourPassword
    • Copy the generated INSERT statement and run it in phpMyAdmin (a template is also included as a comment in sql/database.sql).
    • Delete tools/generate_hash.php afterwards (or lock down the tools/ folder) — it's a development helper only, not something that should stay reachable in production.
  8. Open the app: http://localhost/<your-folder>/

Verifying the setup

  • / should show the public home page.
  • /register should let you create a pending account.
  • Logging in with your admin account and visiting /admin/users should show the user list, including your own account and any test accounts you registered.

If something doesn't work, see Troubleshooting.