• /
  • Log in
  • Free account

PHP agent installation: Non-standard PHP (advanced)

If you are using a non-standard PHP installation, follow this procedure to properly install New Relic. This is common in instances where the default installer does not find your PHP installation (for example, if you have self-compiled PHP or a self-contained PHP stack).


As part of the installation process, change the default application name to a meaningful name.


Use the command line version of PHP (php -i) or look at the output of phpinfo() to determine:

  • The PHP extension version (20090626, 20100525, 20121212, 20131226, 20151012, or 20160303)
  • The extension or module installation directory
  • Whether or not your version of PHP has been compiled with ZTS (Zend Thread Safety) support

Using the command line newrelic-install script (recommended)

  1. Point New Relic at the right directory by using any of these options:

  2. Invoke the newrelic-install script from its directory. Depending on your server and your paths, the install script may find other versions of PHP on your system. Select your specific version from the list.

For more information, see PHP install script. Or, to resume your installation instructions, see New Relic for PHP.

Installing New Relic manually

If you do not want to use the install script, you can perform a fully manual installation. You will need to gather information about your PHP installation, as described above, and create and link or copy the files into place manually.

You can either review and obtain the appropriate values from your phpinfo() yourself, or you can load our manual installation script [ZIP] into your document root to automatically generate all the commands for your specific environment.


The manual installation script is the simpler method, and it can be reused to upgrade the PHP agent. It will also confirm a successful installation upon reload.

Wait for 3 to 5 minutes for results to arrive in your APM Summary page.

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.