New Relic for PHP
The New Relic PHP agent monitors your application to help you identify and solve performance issues. You can also extend the agent’s performance monitoring to collect and analyze business data to help you improve the customer experience and make data-driven business decisions.
- Compatibility and requirements
- Monitor app performance
- Install the agent
- Configure the agent
- Extend agent instrumentation
- Troubleshoot your installation
- For more help
Compatibility and requirements
Before you install the PHP agent, ensure your system meets the system requirements.
The PHP agent supports many of the most common PHP frameworks, databases, andlibraries.
Monitor app performance
View the big picture of your app
- Monitor your app’s Apdex (user satisfaction)
- Get a high-level summary of your app
- Create architectural maps of your app
- Install New Relic Servers for Linux and view detailed server data for your app
Find errors and problems quickly
- Track key transactions
- Create custom dashboards for important metrics
- Alert your team when errors/problems occur before it affects your users
- Track performance after a deploy
Drill down into performance details
- Examine code-level transaction traces
- Examine database query traces
- Examine error traces
Analyze business data
Use the PHP agent with Insights to organize, query, and visualize your data to answer key questions about application performance and customer experience.
- Use default transaction attributes or add your own
- Query your data using NRQL
- Send your own event data
- Create and share customizable, interactive dashboards
Install the agent
If you are installing the agent on a shared hosting service, ensure you have root permissions to install the agent or contact your hosting provider for technical assistance.
For standard installations, see:
- PHP agent installation overview (the basic installation steps for the most common setups).
- Installing on RedHat or CentOS
- Installing on Ubuntu or Debian
- Installing with tar archive (generic method to use on any supported systems such as Linux variants, OpenSolaris, SmartOS, FreeBSD, Mac OS X, etc)
- The newrelic-install script (how to use the interactive script that automates some installation tasks)
For other types of PHP installations and advanced installation topics, see:
- PHP agent installation: Non-standard PHP
- Starting the PHP daemon (a standard New Relic installation starts the daemon automatically, but you can also start the daemon manually)
- Silent mode for the install script
Configure the agent
The agent includes a variety of configuration options to further customize and fine-tune your installation.
The most important part of agent configuration is giving your app a unique name. New Relic uses this app name to aggregate metrics when you have multiple apps or servers.
After changing any agent configuration options, restart your web server.
Extend agent instrumentation
After installing the agent, go further and extend the agent’s instrumentation:
- Page load timing: Integrate the PHP agent with New Relic Browser to gain visibility into end-user activity.
- Custom instrumentation: Instrument transactions not captured as part of our framework instrumentation.
- Agent API: Use the agent API to customize the agent’s behavior. For example, you can collect custom metrics, flag an error, or ignore a particular transaction entirely.
- Agent attributes: Customize the attributes attached to transactions. Customizing attributes allows you to avoid sending sensitive attributes, or to collect additional attributes for deeper visibility into your transactions.
Troubleshoot your installation
If you encounter issues with the PHP agent, see our full list of troubleshooting documentation. Common installation issues include:
- No data appears (PHP)
- Determining permissions requirements
- INI settings not taking effect immediately
- Why and when to restart your web server (PHP)
For more help
Additional documentation resources include:
- PHP agent compatibility & requirements
- Supported PHP frameworks, databases, and libraries
- Supported operating systems
- PHP agent installation overview
- PHP agent configuration docs
- PHP agent troubleshooting (individual topics describing common problems, causes, and solutions for your PHP agent installation)
Join the discussion about PHP in the New Relic Community Forum ! The Community Forum is a public platform to discuss and troubleshoot your New Relic toolset.
If you need additional help, get support at support.newrelic.com .