If your server is suddenly down or having performance issues and you're not sure where to begin, this article outlines some first-aid troubleshooting steps for discovering the cause.
The following is a list of PHP extensions enabled in ServerPilot's PHP builds. For unofficial PHP extensions, see our articles on installing popular third-party PHP extensions.
ServerPilot supports apps running multiple PHP versions on a single server. The PHP versions available on a server are determined by the server's Ubuntu release as shown in the table below.
You can change PHP settings for your apps by creating a file named .user.ini in your app's web root directory.
PECL extensions are third-party extensions for PHP. These extensions often add new built-in functions to PHP that do not exist in the core PHP language.
If you no longer need third-party PHP extensions you've installed, you can remove them. In the examples shown, replace "
You only need to recompile PECL extensions if you've upgraded Ubuntu. PECL extensions are third-party extensions for PHP. These extensions often add new built-in functions to PHP that do not exist in the core PHP language.
The PHP access log is useful for evaluating how your application handles requests, this is especially true when evaluating the performance of PHP.
ServerPilot will automatically update Composer on your servers. If for any reason you need to upgrade Composer yourself, you can do so by running the following command as root:
In the examples shown, replace "X.Y" with your app's PHP version (for example, "8.4"). The purpose of PHP's opcache is to speed up your scripts and save CPU by storing compiled PHP scripts in memory.
Composer is a popular PHP dependency manager. Composer is installed by ServerPilot. However, because ServerPilot makes available multiple versions of PHP, you should invoke the correct Composer command for your app's version of PHP.
PHP includes a built-in function called phpinfo() for viewing PHP settings. This can be useful to check default PHP settings or to see if the changes to PHP settings you've made were done correctly.
When a static file is requested from an app on your server, a Content-Length HTTP response header is automatically included in the response sent to the browser.
The max_children setting limits the maximum number of simultaneously executing PHP requests an app is allowed to have. As a separate PHP process is required for each concurrently executing PHP request and each PHP process is a "
In this tutorial, we'll show you how to install and configure New Relic for monitoring PHP apps. You need to follow this tutorial rather than the standard New Relic instructions because ServerPilot installs its own builds of PHP on your servers.
Every server has a limited amount of memory, also known as RAM. The amount of memory your server has is determined by the type of server you're paying for at your server provider.
PHP's Command Line Interface (CLI) allows you to execute PHP scripts when logged in to your server through SSH.
To enable the PHP JIT compiler, SSH into your server as root and edit the following file: /etc/php8.0-sp/conf.d/opcache.ini Add the following line to the end of the file:
With the release of Composer version 2, ServerPilot now provides this version to all servers by default. However, some applications may not be fully compatible with version 2, and so you may need to use version 1 until they address those incompatibilities.
This article is about changing the PHP timezone. If you instead need to update PHP's database of timezone information, see how to update timezonedb.
This article is about updating the internal database of information PHP uses to determine the time based on any given timezone.
ServerPilot allows you to change the PHP version under which your App runs after it's already been configured. Simply follow these steps:
ServerPilot allows you to easily change your app's PHP version. This is a simple and powerful way to develop and test your WordPress, Drupal, Laravel, and other applications with PHP 5.
ServerPilot allows you to easily change your app's PHP version. This is a simple and powerful way to develop and test your WordPress, Drupal, Laravel, and other applications with PHP 7.
PEAR is a command line PHP library manager that simply downloads PHP libraries hosted at http://pear.php.net. PEAR itself is already installed by ServerPilot.
In this tutorial, we'll show you how to use ServerPilot to install concrete5 on your server. Connecting your server First, you'll need to get yourself a server running 64-bit Ubuntu 16.
In this tutorial, we'll show you how to install phpMyAdmin. This tutorial assumes you have already connected your server to ServerPilot and that you have created at least one app on the server.
One copy of phpMyAdmin installed on a single app on your server will allow you to access all of your apps' databases; however, if you don't want phpMyAdmin installed on one of your existing apps, you can install it on its own with the same result.
You can change the amount of memory PHP allots to each request by using a .user.ini file. Using .user.ini does not change the WordPress memory limit.
For each PHP version ServerPilot installs on your server, ServerPilot also installs the PHP command line interface (CLI) for that PHP version.
If you receive errors when uploading files or images to your app, you can increase the file size upload limit by changing your app's PHP settings.
Many developers prefer to use clean URLs like these in their apps: http://example.com/profiles/foo rather than URLs like the following that include the PHP script filename in the URL:
Careful! We can't provide support for customizations or for any errors, downtime, or vulnerabilities you introduce through customizations. Unless you're absolutely sure about what you're doing, you should stop now!
The PHP setting max_execution_time is the number of seconds PHP will allow a script to run before PHP terminates the script.
If your PHP app displays the following error: Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.
In the examples shown, replace "X.Y" with your app's PHP version (for example, "5.6" or "7.0"). MDB2 is a merge of the PEAR DC and the Metabase PHP database abstraction layers.
HTTP Digest Authentication data sent to your app through request headers is accessible through the $_ENV['HTTP_AUTHORIZATION'] variable in PHP.
The PHP slow request log is where PHP records information about any request that takes more than five seconds to execute.
Your server's CPU usage is related to the total amount of traffic your apps receive and how CPU-intensive your apps are.
By default, PHP does not restrict which files and directories your PHP scripts can access. To restrict the directories that can be accessed, you can use PHP's open_basedir setting.
Some PHP applications look for configuration data in environment variables. You can set environment variables for your app using .