🧰 System Requirements

This guide lists the minimum and recommended requirements to run PhPstrap smoothly in development and production.

TL;DR: PHP 8.1+, MySQL/MariaDB, Apache or Nginx, and common PHP extensions (PDO, cURL, JSON, OpenSSL, Zip, GD). Ensure config/, cache/, uploads/, and logs/ are writable.

✅ Minimum Requirements

  • PHP: 8.1 or newer
  • Database: MySQL 5.7+ or MariaDB 10.4+
  • Web Server: Apache 2.4+ (with mod_rewrite) or Nginx 1.18+
  • Disk Permissions: Writable /config, /cache, /uploads, /logs
  • Extensions (required):
    • PDO + PDO MySQL
    • mbstring
    • curl
    • json
    • openssl
    • zip
    • gd

💡 Recommended (Production)

  • PHP: 8.2 or 8.3
  • OPcache: Enabled for faster performance
  • Database: MySQL 8.0+ or MariaDB 10.6+
  • HTTPS: Valid TLS certificate (LetsEncrypt or equivalent)
  • Memory limit: 256M or higher
  • Max execution time: 60–120s (installer/updates unzip safely)
  • Upload limits: 10–50MB (upload_max_filesize, post_max_size)
  • Time zone: Set date.timezone (e.g., UTC)

🔌 PHP Extensions (Details)

Required
  • pdo, pdo_mysql — database access
  • mbstring — multibyte string handling
  • curl — GitHub updater, external requests
  • json — config, module settings, APIs
  • openssl — secure HTTPS requests
  • zip — installer/updater archive operations
  • gd — image manipulations (avatars, assets)
Optional / Nice to Have
  • intl — better date/locale formatting
  • imagick — higher quality image processing
  • ldap — enterprise auth (future modules)
  • redis — caching (future optimization)

🗄️ Database

  • Use UTF-8 (utf8mb4) charset and utf8mb4_unicode_ci collation.
  • Ensure the DB user can CREATE, ALTER, INDEX, and INSERT/UPDATE/DELETE.
  • Installer creates tables and inserts defaults; no manual SQL required.

🌐 Web Server

Apache
  • Enable mod_rewrite (pretty URLs / future modules).
  • Honor project .htaccess for basic hardening and rewrites.
Nginx
  • Route PHP requests to PHP-FPM.
  • Allow access to /assets, /uploads, deny direct access to /config, /logs, /installer.

🔐 File & Directory Permissions

  • Directories: 755
  • Files: 644
  • Writable by PHP: /config, /cache, /uploads, /logs
  • Production tip: Make /config writable only during installation/updates, then revert.

⚙️ PHP ini Settings (Suggested)

DirectiveRecommendedNotes
memory_limit256MMore for large imports/updates
max_execution_time60–120Installer/Updater unzip + copy
upload_max_filesize10–50MAdjust to your content needs
post_max_size10–50Mupload_max_filesize
date.timezoneUTCOr your region (e.g., Europe/London)
opcache.enableOnSignificant performance boost
expose_phpOffMinor security hardening
display_errorsOff (prod)On in dev only
log_errorsOnLog to file, not screen

🔎 What the Installer Checks

The installer performs a quick environment scan similar to:

  • PHP version and required extensions (PDO, mbstring, curl, json, openssl, zip, gd)
  • Directory writability: /config, /cache, /uploads, /logs
  • Database connectivity (host, port, user, permissions)
  • Optional features: OPcache, ZipArchive, etc.

🧯 Troubleshooting

  • “Cannot connect to DB” — verify host, port (usually 3306), credentials, and GRANT permissions.
  • “ZipArchive missing” — install/enabled zip + ZipArchive in PHP.
  • “Permission denied” — ensure web server user can write to /config, /cache, /uploads, /logs.
  • “Updater can’t fetch GitHub” — enable curl and outbound HTTPS; optionally set GITHUB_TOKEN in env.
  • White page/500 — check logs/ and web server error logs; disable display_errors in production.

Need help verifying your environment? Run the installer’s Requirements step or open an issue on GitHub.