Before you install the PHP agent, make sure your system meets the version requirements listed below.
The following PHP versions are supported:
7.0 - 7.4
8.0 - 8.2
When PHP 8.0, 8.1, or 8.2 detects an observability extension (the PHP agent), Just-In-Time compilation is disabled.
PHP 8.1 and later does not support Fibers.
See PHP agent release notes for the latest PHP agent release.
For PHP builds that are compiled with Zend Thread Safety (ZTS), only PHP agent 9.19 and earlier support these builds.
If you're using an unsupported PHP version or platform (such as a 32 bit OS, FreeBSD, or ZTS builds), we recommend disabling the auto-update mechanisms for the PHP agent packages. Failure to prevent automatic upgrades could lead to the installation of a newer agent version, which may no longer support critical features essential for APM data collection, resulting in disruptions to monitoring capabilities.
To disable auto-update, you have two options:
- Add the PHP agent packages to an exclusion list for package upgrades, or
- Version pin the PHP agent package to an agent version that supports the old, unsupported feature(s). The affected PHP agent packages are:
Installing the PHP agent requires root access to:
- Read/write access to the PHP extensions directory.
- Read/write access to PHP configuration data, either in the PHP configuration directory (preferred) or in
- Restart the web server or PHP process pool.
Running the agent does not require root access. The agent does need read/write access to the following files (the location of these files can be customized in the PHP agent settings):
- A file storing the agent log files
- A file storing the agent socket endpoint
- A file storing the agent process ID
Your New Relic is a 40-character hexadecimal string that New Relic provides when you sign up for your account. For more information, see the PHP install script or license key settings in the PHP
The following processors are supported:
- Intel (and compatible) platforms
When vendors announce end of life (such as on Ubunto's End of Standard Support page), we will continue to support those latest versions for one year. However, if the PHP version you're using is no longer officially supported, then support could end sooner than one year.
This is why we recommend always using the latest version of the OS that is officially supported by the vendor. The latest versions of our agent may work on OS versions that are past End of Life, but we longer test or officially support the PHP agent with older versions.
The PHP agent supports the operating systems listed in the table below.
The following web servers are supported:
- Apache 2.2 or 2.4 via
- Any web server that supports FastCGI using PHP-FPM
The following frameworks are supported:
Magento 1.x and 2.x, CE and EE
Slim 2.x, 3.x, and 4.x
Joomla 3.x is not supported on PHP 8.x.
Symfony 3.x, 4.x, and 5.x
Laravel 6.x, 7.x, 8.x, 9.x, and 10.x
Lumen 6.x, 7.x, 8.x, 9.x, and 10.x
Zend Framework 1.x, 2.x, and 3.x
The PHP agent's list of frameworks continues to grow. Even if the framework you are using is not listed here, the PHP agent may be able to provide you with useful information about your app.
The following databases and libraries are supported:
Firebird (PDO Driver only)
Microsoft SQL Server (PDO Driver only)
ODBC (PDO Driver only)
Sybase (PDO Driver only)
If your application uses any additional monitoring software, we cannot guarantee that our agent will work correctly and cannot offer technical support. For more information, see Errors when using other monitoring software.
New Relic collects instance details for a variety of databases and database drivers. The following databases and extensions are supported:
To disable collection of host information, configure one of the following in the
- Disable instance reporting with
newrelic.datastore_tracer.instance_reporting.enabled = false
- Omit the database name with
newrelic.datastore_tracer.database_name_reporting.enabled = false
To request instance-level information from datastores currently not listed for your PHP agent, get support at support.newrelic.com.
The following supports message queuing:
- Laravel queuing
As a standard security measure for data collection, your app server must support SHA-2 (256-bit). SHA-1 is not supported.
The PHP agent integrates with other New Relic features to give you end-to-end visibility:
The PHP agent automatically injects the browser agent's JS code when you enable auto-instrumentation. After enabling browser injection, you can view data in the APM Summary page and quickly switch between the APM and browser data for a particular app. For configuration options and manual instrumentation, see Browser monitoring and the PHP agent.
New Relic CodeStream brings observability into the IDE to show how your code is performing in production at the method level.
PHP versions 7.0 - 7.4 and 8.0 - 8.2 report code-level metrics (starting with release 10.4.0).
When you install the infrastructure and APM agents on the same host, they automatically detect one another. You can then view a list of hosts in the APM UI, and filter your hosts by APM app in the infrastructure UI. For more information, see APM data in infrastructure monitoring.
The PHP agent supports our logs in context feature for Monolog 2 and 3 libraries.
Synthetic transaction traces connect requests from synthetic monitors to the underlying APM transaction.