Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

PHP settings for Exponential

The php.ini values the Exponential installer checks, a production set for a PHP-FPM pool, upload limits, time zone, OPcache, error display, the PHP functions some features need, and where Velocity and FrankenPHP take…

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/help/hosting/basics/php-settings-for-exponential.md

On this page

PHP settings for Exponential

This page is for system administrators who configure PHP for Exponential sites, on a shared server, a panel or a dedicated machine. It answers: which php.ini values the installer insists on, what a production pool should set, which PHP functions features of Exponential call (and what stops working when a host disables them), and where the settings live when Velocity or FrankenPHP runs PHP instead of PHP-FPM.

Setup, Ini settings: read the INI settings of a siteaccess and where each value comes from
Setup, Ini settings: read the INI settings of a siteaccess and where each value comes from

Contents

  1. What the installer checks
  2. A production set for a pool
  3. Time zone
  4. Error display
  5. OPcache under PHP-FPM
  6. Functions some features call
  7. Timeouts
  8. Velocity and FrankenPHP
  9. Applying a change
  10. Checklist
  11. Related pages

What the installer checks

From chapter 2.5 and settings/setup.ini:

SettingValueChecked by
memory_limitat least 64M (-1 passes)critical test memory_limit, [memory_limit] MinMemoryLimit=64M
max_execution_timeat least 30 (0 passes)critical test execution_time, [execution_time] MinExecutionTime=30
date.timezonesetcritical test timezone
file_uploadsOn, and the upload directory exists and is writablecritical test file_upload
upload_tmp_dira writable directory, or emptywhen empty the test checks TMPDIR or /tmp
allow_url_fopenOncritical test allow_url_fopen
variables_ordercontains E, for example EGPCSoptional test variables_order
open_basediremptyoptional test open_basedir (a warning only)
upload_max_filesize, post_max_sizeas large as the files editors uploadnot tested; PHP refuses larger uploads

The 64M floor is what the installer needs, not what a running site should have. The administration's Setup > System information health check reports a memory_limit below 128M as a failure and below 256M as a warning, and a max_execution_time below 30 seconds on a web server (System information, health checks).

A production set for a pool

The minimal production set from chapter 2, as a PHP-FPM pool's php_admin_value lines or in php.ini:

memory_limit = 256M
max_execution_time = 60
date.timezone = Europe/Berlin
file_uploads = On
upload_max_filesize = 64M
post_max_size = 64M
allow_url_fopen = On
variables_order = "EGPCS"

The values above the minimums are suggestions, not requirements: size them for the largest file a customer uploads and the longest import run through the browser. A plan can state its upload limit as one of its properties.

Note

open_basedir is common on shared hosting. The installer only warns about it ("open_basedir is in use and can give problems running Exponential due to bugs in some PHP versions."). If you set it, include the installation directory, the upload temporary directory and the directory of [FileSettings] TemporaryDir (/tmp/ shipped).

Time zone

index.php sets UTC when php.ini has no date.timezone; the installer's test fails only in that case. A site can also set its own zone in settings/site.ini, [TimeZoneSettings] TimeZone, applied by the kernel on every request. For a host, setting date.timezone in every pool to the zone of the server (or UTC) is enough; customers set their own in the site's settings.

Error display

From chapter 13.4: in the php.ini of PHP-FPM set

display_errors = Off
log_errors = On
expose_php = Off

The System information page flags display_errors as a health problem. Exponential's own debug output is a separate switch, site.ini [DebugSettings] DebugOutput, which must be off on production as well.

OPcache under PHP-FPM

From chapter 10.12:

opcache.enable=1
opcache.memory_consumption=256
opcache.max_accelerated_files=20000
opcache.interned_strings_buffer=32
; keep timestamp checks on: Exponential rewrites PHP cache files (INI caches,
; compiled templates, expiry.php) under the same name
opcache.validate_timestamps=1
opcache.revalidate_freq=2

Warning

Never set opcache.validate_timestamps=0 on an Exponential site. A cache file rewritten after a clear would be served in its old form until PHP restarts. Hosts that turn timestamp checks off globally for speed must exempt Exponential pools. More in OPcache.

Functions some features call

Hosts often list functions in disable_functions. These features of Exponential call functions that are commonly on such lists; the site keeps running without them, but the feature does not work:

FunctionUsed byWithout itSource
systemthe ImageMagick converter (eZImageShellFactory)ImageMagick conversions fail; GD still workslib/ezimage/classes/ezimageshellhandler.php, settings/image.ini [ImageMagick]
proc_openSetup > Cronjobs: starting a job from the administrationthe page says so; run cron from a shellCronjobs guide
execSetup > Cronjobs: reading the crontabthe page says which feature is missingCronjobs guide
posix_killSetup > Cronjobs: Stop running jobthe button cannot stop a jobCronjobs guide
opcache_get_statusSetup > System information: OPcache figuresthe cache works; only its figures are not shownSystem information
pcntl_forkasynchronous publishing (bin/php/ezasynchronouspublisher.php)asynchronous publishing is unavailablecomposer.json suggest ext-pcntl

A command-line PHP for cron and Velocity usually has its own php.ini without such a list; check with php --ini.

Timeouts

  • max_execution_time limits PHP's own CPU time; under PHP-FPM the hard limit of a request is the pool's request_terminate_timeout (off unless set) (chapter 9.2).
  • With SQLite, keep [DatabaseSettings] SQLiteTransactionWait (25 seconds shipped) below the request timeout, or a waiting writer is killed before the driver can report (SQLite for hosts).
  • The setup wizard's configuration step on MongoDB can take one to three minutes; raise request_terminate_timeout for that install or use the console (MongoDB for hosts).
  • Sessions: site.ini [Session] SessionTimeout (shipped 31104000 seconds, 360 days) overwrites session.gc_maxlifetime with PHP's own session handler.

Velocity and FrankenPHP

Velocity runs PHP as command line processes and passes its own options from settings/velocity.ini, [PHPSettings] IniOptions[]. The shipped list turns on OPcache for the command line (opcache.enable_cli=1), sets memory_consumption=512, max_accelerated_files=20000, interned_strings_buffer=64, opcache.revalidate_freq=0, opcache.file_update_protection=0 and apc.shm_size=256M. The two OPcache values differ from PHP-FPM on purpose: a Velocity worker is one long request, and with the PHP-FPM values it would keep serving stale cache files (chapter 10.12). Put changes in settings/override/velocity.ini.append.php, never in the shipped file.

FrankenPHP reads no php.ini of the machine. settings/velocity.ini, [FrankenPHPSettings] IniOptions[] ships display_errors=Off, log_errors=On, memory_limit=512M, opcache.enable=1, post_max_size=64M and upload_max_filesize=32M; PHPIniFile names a php.ini of your own instead (chapter 8.4).

Applying a change

After editing php.ini or a pool, reload what runs PHP: PHP-FPM, Apache with mod_php, or Velocity (php bin/php/console exp:velocity restart). php --ini shows which files the command line PHP reads; the web PHP may read others. A change that "does not work" is most often a change to the file the other PHP reads.

Checklist

  • To do: memory_limit 256M or more for production pools (64M is only the installer's floor).
  • To do: max_execution_time, date.timezone, file_uploads, allow_url_fopen and variables_order set.
  • To do: Upload limits stated in the plan and set in the pool.
  • To do: display_errors=Off, log_errors=On, expose_php=Off.
  • To do: OPcache on, with timestamp checks kept on.
  • To do: disable_functions reviewed against the table above.
  • To do: Velocity and FrankenPHP settings changed in settings/override/velocity.ini.append.php only.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x