This section provides information about compatibility and requirements, basic instructions on how to install and configure the PHP agent, and links to more detailed information.
To use the PHP agent:
- Make sure your system meets New Relic's PHP compatibility and requirements.
- If you do not already have a New Relic account, create one.
- From your New Relic Account settings, copy your license key information.
- Follow the agent installation procedures for both the PHP extension and the local proxy daemon.
- Complete the configuration settings for the agent and optionally the proxy daemon.
- Change the default application name to a meaningful name.
- Restart Apache or your PHP host program (such as php-fpm) as applicable.
- If no data appears after a few minutes, see Troubleshooting your installation.
Also refer to the For more help section in this document.
Compatibility and requirements
Before you install New Relic for PHP, make sure your system meets these requirements.
|New Relic PHP Agent||Requirements|
5.2, 5.3, 5.4, 5.5, 5.6
Installation: Root access is required for most installations.
Running: Root access is not required.
Intel (and compatible) platforms only.
Support for SSE2 instructions is required.
Linux (x86 and x86_64):
|SmartOS and Solaris (x64):
Caution: Known issues can occur when using the agent on x86 SmartOS and Solaris systems.
|Mac OS X (x86_64 only):
|Note: Support for FreeBSD and 32-bit Mac OS X was removed in release 4.6 of the agent.|
Apache 2.2 or 2.4 via mod_php
The New Relic PHP agent's list of frameworks continues to grow. Even if the framework you are using is not listed here, New Relic's engineers may be able to provide you with useful information about your app. For more information, see PHP frameworks: Integrating support for New Relic. Or, if you need help or if you want to request other popular PHP frameworks, get support at support.newrelic.com.
For any installation, you will need your New Relic license key. This is a 40-character hexadecimal string that New Relic provides when you sign up for your account. To view your license key: From the New Relic menu bar, select (account) > Account settings.
The agent has two parts, a PHP extension and a local proxy daemon. Follow the appropriate installation instructions carefully to make sure you have accounted for both.
Note: As part of the installation process, change the default application name to a meaningful name.
For standard installations, see:
- Quick installation instructions (advanced users)
- The newrelic-install script
- Installation: RedHat and CentOS
- Installation: Ubuntu and Debian
- Installation: Tar file (other Linux variants, OpenSolaris, SmartOS)
- Starting the PHP daemon (a standard New Relic installation starts the daemon automatically, but you can also start the daemon manually)
For other types of PHP installations, see PHP agent installation: Non-standard PHP.
After installing the PHP agent, configure the settings for both the agent and the proxy daemon, and then restart Apache or your alternate web dispatcher as applicable. For more information, see:
For information about advanced configuration settings, see:
- The PHP API (PHP calls you can add to your app to fine-tune your New Relic settings)
- PHP agent (newrelic.ini) settings (the full list of options you can set in your INI file)
- Page load timing process and Page load timing in PHP (how to collect browser timing information from your site visitors)
For more help
Additional documentation resources include: