PHP Settings

Configure platform-wide PHP defaults and the template used to generate per-domain PHP-FPM pools. Available only when PHP is installed and at least one PHP version is configured. Access: root.

Tabs

  • Default Values — save the baseline php.ini style settings new accounts inherit; many changes apply system-wide.
  • PHP-FPM Template — edit the pool template used when creating domains; optionally bulk-apply to existing domains.

Default Values

What you can set:

  • OPcache: opcache.revalidate_freq (seconds, 0–86400).
  • Runtime toggles: allow_url_fopen, display_errors, file_uploads (on/off).
  • Sizes (MB): upload_max_filesize, post_max_size, memory_limit — format NUMM (e.g., 512M), max 10240M.
  • Limits: max_file_uploads (1–100), max_execution_time (1–3600 s), max_input_time (0–3600 s), max_input_vars (1–10000).
  • Sessions: session.gc_maxlifetime (60–86400 s) and session.save_path (/tmp or an absolute path).
  • Error handling: error_reporting using PHP constants (e.g., E_ALL & ~E_WARNING & ~E_DEPRECATED & ~E_STRICT).
  • Date/Time: date.timezone from the IANA list (e.g., Europe/London, UTC).

How saving works:

  • Inputs are validated (ranges, formats like ###M, allowed constants and paths).
  • On success, defaults are stored and key directives are written into the active PHP runtimes so changes take effect without manual edits.

Practical tips:

  • Keep post_max_sizeupload_max_filesize.
  • In production, prefer display_errors=off and control visibility via logs.
  • Match memory_limit to each account’s compute budget; higher isn’t always faster.
  • If you set a custom session.save_path, ensure it exists and is writable inside the account’s chroot.

PHP-FPM Template

What it does:

  • Defines the per-domain PHP-FPM pool structure (user/group, sockets, env, timeouts, pm settings, includes).
  • Save Changes updates the template for future domains.
  • Validate & Apply changes to all Domain accounts regenerates pools for existing domains and streams live progress.

Safety notes:

  • Bulk apply affects every domain’s pool; schedule a window for busy servers.
  • Use placeholders/variables in the template; avoid hardcoding absolute paths or usernames.

Troubleshooting

  • “PHP is not available…” — install PHP and configure at least one version.
  • Settings don’t seem to apply — check that domain-level overrides (.user.ini, per-pool ini/flags) aren’t overriding the defaults.
  • Validation error on save — fix the reported field (range/format) and try again.
  • Bulk apply stopped — the progress stream shows the failing domain; correct the template or that domain’s data, then re-run.

Navigation