Before you install the PHP agent, make sure your system meets the version requirements listed below.
PHP agent compatibility
PHP Version | Agent Version | Currently Supported |
---|---|---|
8.3 | Yes | |
8.2 | All Supported Agent Versions | Yes |
8.1 | All Supported Agent Versions | Yes |
8.0 | All Supported Agent Versions | Yes |
7.4 | All Supported Agent Versions | Yes |
7.3 | All Supported Agent Versions | Yes |
7.2 | All Supported Agent Versions | Yes |
7.1 | No | |
7.0 | No |
See PHP agent release notes for the latest PHP agent release.
For an up-to-date list of all currently supported PHP Agent releases, see the PHP Agent EOL Policy.
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. If you fail to prevent automatic upgrades, this could lead to the accidental installation of a newer agent version. The newer version 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:
newrelic-php5
newrelic-php5-common
newrelic-daemon
Zend Thread Safety
PHP builds that are compiled with Zend Thread Safety (ZTS) are not supported.
Just-In-Time Compilation (JIT)
Just-In-Time compilation is supported as of agent release 10.18.0.8. PHP automatically disables JIT for any earlier versions of the PHP Agent.
Fibers
Fibers is not supported.
Permissions
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
php.ini
. - 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
License key
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 oder license key settings in the PHP ini
file.
Processors
The following processor architectures are supported:
- x86_64 (also known as amd64)
- aarch64 (also known as ARM64)
Important
aarch64 (ARM64) support is only available on PHP 8.0+.
Operating systems
When vendors announce end-of-life (such as on Ubuntu's End of Standard Support page), we will continue to support those latest versions for one year after the vendor end-of-life date. 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 no longer test or officially support the PHP agent with older versions.
Based on the information above the PHP agent, can be installed on operating systems using the install methods listed in the table below.
Operating system | Release | CPU architecture | Install method |
---|---|---|---|
Alpine Linux | 3.15, 3.16, 3.17, 3.18, 3.19, 3.20 | x86_64, aarch64 | |
Amazon Linux | 2 | x86_64 | |
Amazon Linux | 2 | aarch64 | |
Amazon Linux | 2023 | x86_64, aarch64 | |
CentOS Linux | 7 | x86_64 | |
CentOS Linux | 7 | aarch64 | |
CentOS Stream | 8, 9 | x86_64 | |
CentOS Stream | 8, 9 | aarch64 | |
RedHat Enterprise Linux | 7, 8, 9 | x86_64 | |
RedHat Enterprise Linux | 7, 8, 9 | aarch64 | |
Debian | 10, 11, 12 | x86_64 | |
Debian | 10, 11, 12 | aarch64 | |
Ubuntu | 20, 22, 24 | x86_64 | |
Ubuntu | 20, 22, 24 | aarch64 | |
Any Linux distribution with:
| K.A. | x86_64, aarch64 |
Web servers
The following web servers are supported:
- Apache 2.2 or 2.4 via
mod_php
- Any web server that supports FastCGI using PHP-FPM
Frameworks
The following frameworks are supported:
Framework | Version | Considerations |
---|---|---|
Drupal | 7.x, 8.x, 9.x, 10.x, 11.x | Drupal specific functionality |
Joomla | 3.x | |
Laminas | 3.x | |
Laravel | 6.x, 7.x, 8.x, 9.x, 10.x, 11.x | Laravel Horizon is not supported. |
Lumen | 6.x, 7.x, 8.x, 9.x, 10.x | |
Magento | 2.x (CE and EE) | |
MediaWiki | 1.31+ | |
Slim | 2.x, 3.x, 4.x | |
Symfony | 4.x, 5.x | |
Wordpress | 5.9+ | |
Yii | 2.0 | |
Zend Framework | 3.x |
If you want to suggest support for other popular PHP frameworks, visit the Support Forum and create a Feature Idea
. For more information, see PHP frameworks: Integrating support for New Relic.
Databases and libraries
The following databases and libraries are supported:
Firebird (PDO Driver only) | Oracle |
Informix | PDO Drivers |
Memcached | Postgres |
MongoDB | |
Microsoft SQL Server (PDO Driver only) | Redis |
MySQL | SQLite |
ODBC (PDO Driver only) | Sybase (PDO Driver only) |
Other third-party monitoring software
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.
Instance details
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 newrelic.ini
file:
- 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.
Message queuing
The following supports message queuing:
- HTTP
- Laravel queuing
Important
Laravel Horizon is not supported.
Security requirements
As a standard security measure for data collection, your app server must support SHA-2 (256-bit). SHA-1 is not supported.
New Relic feature support
The PHP agent integrates with other New Relic features to give you end-to-end visibility:
Produkt | Integration |
---|---|
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.3 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. | |
The PHP agent sends default events and attributes for NRQL queries. You can also record custom events for advanced analysis. | |
Synthetic transaction traces connect requests from synthetic monitors to the underlying APM transaction. |