PHP
Install and remove PHP versions, choose the default, turn extensions and ionCube on or off, change the common php.ini settings and edit php.ini.
Open PHP in the server's sidebar (under Software). It lists the PHP versions installed on the server and lets you manage one version at a time: its common settings, its extensions, ionCube and the php.ini file. Central shows and changes PHP on the server itself. Applications that have their own PHP settings keep them (see PHP settings).
-
Open PHP in the server's sidebar.

Installed versions lists each Version with its Support state (Supported, Security fixes only or No longer supported), its Status (Ready, Installing, Queued, Install failed or Removal failed) and Used by (for example "Used by 2 sites", or "ServerAvatar runs on this"). The default version carries a Default badge. Select a version to open Settings for PHP version.
If the server was set up without PHP (for example a Node.js-only stack), the page says "Not available on this server's stack".
Install a PHP version
-
Select Install version.

-
Choose a Version. Only versions this server can install are listed. A version that no longer gets security fixes shows a warning: "PHP version no longer gets security fixes. Install it only if a site needs it."
-
Select Install. You see "Installing PHP version — this takes a few minutes." The row shows Installing, or Queued when another install is running first ("Another install is running. This one starts as soon as it finishes.").
If an install fails, the row shows Install failed with a Reference. Select Show installer output to read it, Try again to retry, or Dismiss to clear it.
Set the default version
- In the row of the version, select Set as default.
- You see "PHP version is now the default." The row shows the Default badge.
Remove a version
- In the row of the version, select Remove and confirm Remove PHP version? "It is uninstalled from the server."
- You see "Removing PHP version — this takes a few minutes."
You cannot remove the default version ("The default version can't be removed."), a version that sites still use ("Sites still use this version."), a version used by cron jobs, or the version ServerAvatar itself runs on ("ServerAvatar itself runs on this version."). Change those first. See Cron jobs.
Change the common settings of a version
Common settings holds the php.ini values people change most, so you do not have to edit the file.
- Select the version, then the Common settings tab.
- Change the fields:
- Memory limit: how much memory one page load may use. Raise it if you see "allowed memory size exhausted".
- Upload max file size: the biggest file a visitor can upload.
- Max execution time (s): how many seconds a page may run before PHP stops it.
- Max input time (s): the time allowed to receive an upload.
- Max input vars: how many fields one form may send.
- Leave Keep a copy of the current settings on. "Without a copy, the old settings are only kept in memory while the new ones are checked. If ServerAvatar stops during the save, they can't be put back."
- Select Save PHP settings. You see "PHP version settings saved." PHP checks the change before it applies it. Discard throws the edits away.
A field that shows "Not set (PHP default)" is not set in php.ini. If you raise Upload max file size above Post max size, Central raises Post max size too ("post_max_size will be raised to size too, or uploads that size would still fail."). A setting that php.ini already sets cannot be emptied from here.
Turn extensions on or off
-
Select the version, then the Extensions tab. The tab shows how many are enabled, for example "18 of 80 enabled".

-
Use Search extensions and the filter (All, Enabled, Disabled, Built-in) to find one.
-
Use the switch of an extension (Enable name). It takes a moment ("Enabling…", "Disabling…").
Extensions marked ServerAvatar are needed by the panel and cannot be turned off ("ServerAvatar needs this extension"). Built-in extensions are part of PHP and are always on ("Always on"); select Show to list them.
ionCube
ionCube lets PHP run files encoded with ionCube. It is available for the versions ionCube publishes a Loader for.
- Select the version, then the ionCube tab. It says Installed, Not installed, Failed or "ionCube isn't available for this PHP version."
- Select Install. "ionCube is being installed for PHP version…"
- To take it off, select Remove and confirm Remove ionCube from PHP version?
When it is installed the tab shows the PHP version and the Loader version.
Edit php.ini
- Select the version, then the php.ini tab. Copy file path copies the path of the file.
- Edit the file, then select Save.
- Confirm php.ini for PHP version: "A wrong setting can stop sites using PHP version. ServerAvatar tests the file before it's used." Select Save.
If PHP rejects the file, the previous one is restored and nothing is reloaded ("PHP rejected that configuration, so the previous one was restored. Nothing was reloaded."). A tab with edits you have not saved shows Unsaved changes. Switching to another version or tab asks Discard your unsaved changes?
Limits
- Memory limit, Upload max file size:
-1(no limit) or a whole number with an optionalK,MorG, at most 12 characters, for example128M. - Max execution time (s): 0 to 3600.
- Max input time (s): -1 (no limit) or 0 to 3600.
- Max input vars: 100 to 100000.
- php.ini: at most 262,144 characters.
- A version is written as major.minor, for example
8.4. - On a server whose stack cannot toggle extensions the page says "This server can't turn extensions on and off." An extension that is still being installed shows Installing.
Who can do this
- Seeing the page, the settings, the extensions and php.ini needs View on
PHP (
server.php). Installing, removing, setting the default, saving settings, switching extensions, ionCube and editing php.ini need Manage. A view-only role sees "Your role can read this file but not change it." on the php.ini tab.
Common errors
- PHP version is used by apps. Change those applications first.
- PHP version is used by cron jobs: cronjobs. Switch them to another version or delete them first.
- This is the default version. Choose another default first.
- Removing PHP version would take the panel offline — it is the version the panel itself runs on.
- extension is compiled into PHP. It cannot be turned off.
- Turning extension off would take the panel offline. The panel needs it.
- PHP rejected that configuration, so the previous one was restored.
- Use a size like 128M, 1G or 512K — or -1 for no limit.
- Enter a number from 100 to 100000. (Max input vars)
- ionCube does not publish a Loader for PHP version.
- The ionCube Loader could not be downloaded. Check the server's internet access and try again.