• English日本語한국어
  • Log inStart now

PHP agent compatibility and requirements

Before you install the PHP agent, make sure your system meets the version requirements listed below.

PHP releases

The following PHP versions are supported:

Version

Compatibility notes

7.0 - 7.4

Support for PHP versions 7.0 and 7.1 will EOL June 1st, 2024.

8.0 - 8.3

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.

PHP 8.1 and later does not support Fibers.

PHP agent compatibility

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. 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

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):

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 or license key settings in the PHP ini file.

Processors

The following processors are supported:

  • Intel (and compatible) platforms
  • ARM64

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. 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.

The PHP agent supports the operating systems listed in the table below.

Operating system

Supported vendors

Compatibility notes

Linux (x86_64)

  • Alpine 3.12 and higher

  • Amazon Linux 2

  • Red Hat Enterprise Linux (RHEL) 7 and higher

  • CentOS 7 and higher

  • Debian 9.0 ("stretch") and higher

  • Ubuntu LTS 18.04 ("Bionic Beaver") and higher, or Ubuntu non-LTS 21.04 ("Hirsute Hippo") and higher

  • Any other Linux distribution with:

    • Kernel version 4.9 (long term) and higher
    • glibc 2.17 or higher with NPTL support or musl libc version 1.1.24 and higher

Linux (ARM64)

  • Amazon Linux 2 (including AWS Graviton 2)
  • CentOS 8
  • Alpine 3.16 or later
  • Debian 11 or later
  • ARM64 is only supported with PHP versions 8.0+.

  • PHP agent 10.10.0 and higher provides support for ARM64 by including binaries in a tarball distribution.

  • PHP agent 9.18.1 - 10.9.0 source distribution provides ARM64 support ONLY on Amazon Linux 2 (including AWS Graviton 2) and Centos 8.

    For more information on ARM64 support and installation, please see the ARM64 installation info.

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:

Drupal 7.x, 8.x, 9.1-9.5

Magento 2.x, CE and EE

Joomla 3.x

Important

Joomla 3.x is not supported on PHP 8.x.

MediaWiki

Laminas 3.x

Slim 2.x, 3.x, and 4.x

Laravel 6.x, 7.x, 8.x, 9.x, and 10.x

Symfony 4.x and 5.x

Lumen 6.x, 7.x, 8.x, 9.x, and 10.x

Wordpress

Zend Framework 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.

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

Guzzle

PHPUnit

Informix

PDO Drivers

Memcached

Postgres

MongoDB

Predis

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.inifile:

  • 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

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:

Product

Integration

Browser monitoring

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.

Codestream (code-level metrics)

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).

Infrastructure monitoring

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.

Logs in context

The PHP agent supports our logs in context feature for Monolog 2 and 3 libraries.

New Relic Dashboards

The PHP agent sends default events and attributes for NRQL queries. You can also record custom events for advanced analysis.

Synthetic monitoring

Synthetic transaction traces connect requests from synthetic monitors to the underlying APM transaction.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.