PHP changes on the new platform

Published

Updated

Reviewedbyfl

🐘

Same PHP, fewer knobs.

PHP on the new fortrabbit platform runs with nearly the same extensions as on the old one, but with fewer settings in the dashboard. Apps moved by the official migration keep their PHP version, and each setting moves to the nearest value the new platform offers.

PHP 8.2 to 8.5 are available on the new platform. PHP 7.4, 8.0 and 8.1 are planned as paid legacy PHP versions.

Extensions

These extensions are always on, no toggle needed: bcmath, bz2, calendar, curl, exif, gd, gettext, gmp, gnupg, igbinary, imagick, imap, intl, ldap, mbstring, memcached, mongodb, mysqli, oauth, odbc, OPcache, pcntl, PDO (MySQL, ODBC, PostgreSQL, SQLite), pgsql, redis, soap, sockets, SQLite3, ssh2, tidy, xsl, yaml and zip. Use phpinfo for the full list of a running environment.

Three extensions are toggles in the PHP settings, all off by default:

  • APCu: on by default on the old platform, now opt-in. With APCu on, OPcache and APCu each get a quarter of the PHP memory. With APCu off, OPcache gets half.
  • New Relic: enter the license key in the dashboard.
  • Blackfire: enter the server ID and server token in the dashboard.

Phalcon, PSR and GeoIP are not available any more. The memcached extension is there, but there is no Memcache service to connect to, see no memcache.

ini settings

The dashboard offers five ini settings, each with a fixed set of values:

SettingOld platformNew platform
max_execution_time2 to 12005, 10, 30, 60, 120
max_input_vars1000 to 100001000, 2000, 4000, 8000
post_max_size1M to 256M64M to 1024M
upload_max_filesize1M to 256M64M to 1024M
output_buffering0 to 102400 or 4096

The official migration moves each value to the nearest one the new platform offers.

memory_limit is not a setting any more: it follows the memory of the booked PHP plan. short_open_tag and default_charset from the old dashboard go into a .user.ini file. realpath_cache_size, opcache.* and apc.* are system settings, which .user.ini cannot change, and keep the platform values.

Timezone is UTC

The old platform set date.timezone to Europe/Berlin by default. The new platform sets no default, so PHP uses UTC, and migrated apps run on UTC too. Check code that relies on the old default, such as dates shown to visitors or cron schedules. To keep the old behavior, set the timezone in the app config, or add date.timezone = "Europe/Berlin" to a .user.ini file.

Written by humans and AI in collaboration.

AI use & editorial processEdit on GitHub ↗