PHP Release Notes


Restart your web server if you have recently upgraded your agent. This will fix most reporting issues and will load the agent's new features and bug fixes.

PHP Agent Release Notes

Wednesday, June 3, 2015 - 06:35

New Features

Support for the Predis library

The PHP agent now supports the Predis library. Users of this library will see new metrics in the Database tab, nodes in transaction traces, and breakdown metrics on individual transaction pages. Pipelining multiple commands will result in those commands being grouped and treated as a single command metric named pipeline.

Note that our Predis support does not include instrumentation for commands wrapped in MULTI and EXEC via the Predis client's transaction method. We also do not instrument the executeRaw or monitor methods of Predis, nor its PubSub functionality.

Increased specificity of PECL Redis metrics

Metrics made for the PECL Redis extension will now more closely match the name of the function called. For example, the redis::setex method will now create a metric with the text setex, rather than simply set.

Named Laravel Artisan commands

Background transactions that are Laravel Artisan commands are now named. Instead of being named unknown, Laravel Artisan commands will now be named based on the command. For instance, the command ./artisan cache:clear will result in a background transaction named Artisan/cache:clear.

UTC offsets in agent logfiles

The log file format has been extended to include the UTC offset of the local timezone. This makes it easier to match log entries to time windows in the New Relic UI.

Thursday, April 30, 2015 - 14:17

New Features

Zend Framework 2 transaction naming support

Support has been added for naming transactions automatically based on ZF2 route names. Transaction naming will work with routes set in module.config.php, or anything else using the setMatchedRouteName method of Zend\Mvc\Router\RouteMatch (or the same methods of the corresponding HTTP and Console routers).

For example:

'router' => array( 'routes' => array( 'route1' => array( ... ) 'route' => '/foo[/:bar][/:baz]', 'constraints' => array( ... ), 'defaults' => array( ... 'route2' => array( ... )

Anything the router matches to route1 will be named route1 regardless of URL, parameters or controller. 404 errors and similar will be named "unknown".

Silex transaction naming support

Support has been added for naming transactions automatically based on Silex controller names. If a route name has been set using the Controller::bind() method, then that will be used, otherwise the default controller name generated by Silex will be used instead.

For example:

// This will be named with the autogenerated "GET_hello_name". $app->get('/hello/{name}', function ($name) { ... });

// This will be named "hello", as bound. $app->get('/hello/{name}', function ($name) { ... })->bind('hello');

Automatic transaction naming will work on all Silex 1.x versions provided the default kernel service has not been replaced with an object of a type other than Symfony\Component\HttpKernel\HttpKernel. If the kernel service has been replaced with something else, you will need to continue to use the newrelic_name_transaction function to name your transactions.

End of Life Notices

  • memcacheDuration attributes have been removed.

    A bug in version 4.19 of the PHP agent removed support for memcacheDuration attributes in Transaction events. We have decided not to restore this functionality, as these durations are now accounted for in databaseDuration attribute values.

Bug Fixes

  • databaseDuration attributes have been restored.

    A bug in versions 4.19 and 4.20 of the PHP agent resulted in databaseDuration attributes no longer being attached to Transaction events. These have been restored, with one change: they now also include time spent in Memcached operations, as these are now unified with other datastores in New Relic APM.

  • Fix application name rollup ordering issue.

    When using application rollup names, the agent had the restriction that any name could only appear as the first rollup name once, which prevented the simultaneous connection of a;b and a;c. This restriction has been removed.

Monday, April 13, 2015 - 16:54

Bug Fixes

  • Support for mixed Laravel 4 and 5 environments has been improved.

    Web servers serving both Laravel 4 and Laravel 5 applications from the same process pool could see autoloader errors in the Laravel 4 applications after the first load of a Laravel 5 page. This has been fixed, and mixed environments should now work as expected.

  • Laravel detection has been improved.

    Starting with Laravel 5.0.15, applications with an optimized classloader use a new location for the optimized "compiled.php" file. Previously, the agent would fail to detect Laravel in this circumstance. The agent now looks in this new location as well as the old location for Laravel auto-detection.

Thursday, April 2, 2015 - 13:51

Bug Fixes

  • MySQLi segfaults fixed.

    Version 4.20.0 could cause the PHP agent to segfault when certain types of parameters were bound to mysqli_stmt objects. This has been fixed.

Wednesday, April 1, 2015 - 07:05

Release Unavailable

Due to a bug in this release related to the new explain plan support for MySQLi, we have decided to remove it from our download servers. Instead, we recommend installing version 4.20.1, which includes a fix for this bug.

New Features

  • Support for Laravel 5.0.

    We are pleased to announce support for the latest Laravel release: Laravel 5. Sites and applications using Laravel 5.0 are now automatically detected and named in the same way as Laravel 4 applications.

  • Support for explain plans with MySQLi.

    The existing support for generating explain plans for slow SELECT queries with the PDO MySQL driver has been extended to MySQLi. Explain plans are controlled by the newrelic.transaction_tracer.explain_enabled and newrelic.transaction_tracer.explain_threshold settings. These plans can be seen in the query analysis section of the slow SQL trace page in APM.

    Explain plans will be generated for queries issued through mysqli_query, mysqli_real_query, and mysqli_stmt_execute, as well as their OO equivalents mysqli::query, mysqli::real_query, and mysqli_stmt::execute.

    Please note that the mysqli_multi_query API is not currently supported, and that explain plans are not generated for multiple (semicolon separated) queries.

  • Added Memcache connection monitoring.

    The connect and pconnect functions (and their OO counterparts) of the Memcache extension are now instrumented, and will generate metrics. As a result, if there is a problem with calling those functions, it will now be visible within New Relic.

Bug Fixes

  • Laravel 4 App::after() filters are no longer overridden.

    In certain circumstances, the improved Laravel transaction naming code in version 4.19 of the PHP agent could result in filters registered using Laravel 4's App::after() method no longer being executed. This has been fixed.

Upgrade Notices

  • The daemon now uses openssl 1.0.1m, rather than 1.0.1l.

  • The daemon now uses curl 7.41.0 rather than 7.40.0.

Wednesday, March 4, 2015 - 15:25

New Features

  • Unified view for SQL database and NoSQL data stores
    The agent will now provide a breakdown of SQL operations according to the database product being used. This is in addition to the existing breakdown of SQL statements and operations. For NoSQL data stores, the agent will now provide a similar breakdown of the operations performed.

  • Memcached and Redis time reported separately
    Previously, the agent grouped Memcached and Redis operations into a single Memcached category. This is no longer the case. Time spent performing Memcached or Redis operations are separate.

Bug Fixes

  • Laravel transaction naming improvements
    Prior to this version, Laravel applications that had replaced the default router service could find that, in some circumstances, their transactions would be named as "unknown" rather than being correctly named from the route. This has been improved: replacement router services will now get appropriate transaction naming provided that they either implement filtering or ensure that the same events are fired as the default Laravel router.
Tuesday, February 17, 2015 - 13:40

New Features

  • Support for New Relic Synthetics.

    The PHP agent now gives you additional information for requests from New Relic Synthetics when the newrelic.synthetics.enabled setting is enabled. The agent records more transaction traces and events for Synthetics-originated requests to give you a clearer look into how your application is performing around the world.

    For more details, see

  • Add a new newrelic_record_custom_event API function.

    This API function allows you to add custom events to New Relic's Insights product. For more information, please see:

  • The daemon now uses openssl 1.0.1k, rather than 1.0.1j.

Bug Fixes

  • The agent properly recognizes prepared statements constructed with mysqli_stmt::__construct().

  • The newrelic-install script has been fixed to once again work for users with custom extension_dir settings.


  • The ability to set the appname to a string like: %{FOO} and have FOO expand into the environment variable was removed.
Friday, January 2, 2015 - 13:40

Bug Fixes

  • Fix a memory leak affecting newrelic_add_custom_parameter API function.
Friday, December 19, 2014 - 10:25

Bug Fixes

  • The agent now uses the route pattern as the transaction name for unnamed, closure-based routes under Laravel. For example, the following route will now be named hello/{name} instead of GET/index.php.

Route::get('hello/{name}', function($name) { return "Hello ${name}!"; });

  • Previously the agent could fail to detect the Laravel framework when artisan optimize was used. This has been fixed.

  • When the agent cannot determine a transaction name for the Laravel framework, the name "unknown" will be used instead of "laravel-routing-error". The latter implied the cause of the failure may have originated within Laravel itself rather than solely within the agent's instrumentation.

Tuesday, October 28, 2014 - 14:35

New Features

Bug Fixes

  • Fix an issue that could cause some background task metrics to be attributed to web transactions and some web transaction metrics to be attributed to background tasks. This could affect Drupal customers whose applications use drupal_cron_run.

  • This release changes the handling of HTTP Referer headers to always strip query parameters before reporting to New Relic. Previously, any query parameters present in a Referer header would be reported to New Relic by the PHP agent.

  • Fix an issue where urls using the file: protocol scheme with curl_exec() would cause the agent to record external metrics. This has been corrected and the agent will no longer treat file urls as external services.

Wednesday, September 24, 2014 - 11:22

New Features

  • Support for agent-side configuration of application labels using the newrelic.labels INI setting has been added.

    New Relic enables you to label and organize your apps so they "roll up" into an unlimited number of meaningful categories. You can also easily sort, filter, and page through all the applications on your account's Applications list.

    See the New Relic APM documentation and the PHP agent (newrelic.ini) settings documentation for more details.

Bug Fixes

  • Fixed issue that could prevent capturing database table name for prepared statements on PHP 5.6.
Thursday, September 11, 2014 - 10:30

Bug Fixes

  • Fix an edge case segfault that could occur in situations where the daemon failed to initialize.
Wednesday, September 10, 2014 - 13:00

New Features

Thursday, August 28, 2014 - 15:09

New Features

  • Added two new attributes to transaction events: errorMessage and errorType. These attributes allow for the tracking of errors within the Insights product. As a result, error messages will no longer be recorded if the agent is in high security mode.

  • Background tasks will now create Transaction events which can be tracked in the Insights product.

Bug Fixes

  • Fixed request queuing metrics support

    The PHP Agent will now allow the leading t= prefix to be optional when parsing HTTP_X_REQUEST_START and X-Request-Start headers. Previously, the header would be treated as absent if no leading t= was included.

  • Fixed presentation of the newrelic.daemon.proxy setting in phpinfo()

    The phpinfo() function will now display a value of no value as the default for the newrelic.daemon.proxy setting. Previously, it would incorrectly display a value of ***INVALID FORMAT***.

Monday, August 25, 2014 - 10:23


Bug Fixes

  • Fix to prevent proxy credentials transmission

    This update prevents proxy credentials set in the agent config file from being transmitted to New Relic.

Thursday, July 31, 2014 - 15:05

New Features

  • Our long-awaited support for Joomla 2.x and 3.x have been added. The PHP agent now instruments and names Joomla transactions without the need for additional plugins.

Bug Fixes

  • Prevent injection of page load timing JavaScript when the Content-Type is first set to text/html then changed to something else, such as application/json.

  • Fix Zend Framework transaction naming when exit() is called during request processing. Previously, it was possible to exit before the agent set the transaction name. This caused the transaction to be reported as index.php, an issue that most commonly occurs with the Redirect action helper. The agent now correctly names these transactions.

  • Fix segfault triggered by JSON encoding when strings to be encoded are marked as UTF-8, yet contain invalid UTF-8 byte sequences.

Tuesday, July 1, 2014 - 01:30


Bug Fixes

  • Fixed an issue whereby Debian and Ubuntu users running the daemon via the init script may have been unable to start the daemon after upgrading to 4.10.0. This has been fixed by reverting back to the init script used in 4.9.0 and earlier versions.
Monday, June 30, 2014 - 19:01


End of Life Notices

  • The MacOSX/Darwin agent and daemon are now compiled only for Mac OS X 10.6 or higher.

New Features

  • Changed the daemon to use openssl 1.0.1h, rather than 1.0.1g.

  • Logging to stdout and stderr is now supported when running the daemon in the foreground.

  • Created new installer for Ubuntu/Debian systems. If the application name is not present, the installation process will ask for one. Also, Debian/Ubuntu users do not have to run the newrelic-install script.

Upgrade Notices

  • The agent now supports PHP 5.6beta4.

Bug Fixes

  • Zend externals could be double counted when the cURL adapter was used. In previous versions of the agent, using Zend_Http_Client::setAdapter() with an instance of Zend_Http_Client_Adapter_Curl caused the agent to double count the external call. This has been fixed.

  • Prevent real user monitoring javascript injection when a Content-Type header has not been set and the default mimetype is not text/html.

Tuesday, May 20, 2014 - 22:39


New Features

  • Added new local setting to enable high security mode. newrelic.high_security = false

    This setting is false by default. When set to true, this setting has the following effects:

    • Data will not be sent to New Relic unless the newrelic-daemon is using SSL.

    • Raw SQL strings will never be gathered, regardless of the value of newrelic.transaction_tracer.record_sql.

    • Request parameters will never be captured, regardless of the value of newrelic.capture_params.

    • The following API functions will have no effect, and will return false: newrelic_add_custom_parameter newrelic_set_user_attributes

    If you change this setting, you must also change the RPM UI security setting. If the two settings do not match, then no data will be collected.

  • Introduce new attribute configuration scheme.

    All parameters captured by the agent and created by the newrelic_add_custom_parameter API call are now considered attributes and have a new set of INI configuration options. As a result, the newrelic.capture_params and newrelic.ignored_params configuration options have been deprecated. The newrelic.ignored_params comparison will now be case-sensitive.

    For full information, please see the documentation.

Bug Fixes

  • The Laravel 4.0 framework is now supported in a manner analogous to the existing support for Laravel 4.1. (The portion of the routing code that is instrument changed the function names and arguments slightly going from Laravel 4.0 to Laravel 4.1.)

  • Fix potential metric grouping issue with Kohana transaction naming. Previously, the agent would treat the first two segments of the request URI as the controller and action when no route was found. Now the agent will use 'unknown' as the transaction name when no route is found. This is consistent with the behavior for other frameworks.

Thursday, April 24, 2014 - 18:22


New Features

  • Upgraded to cURL version 7.35 from 7.30.
  • Upgraded to OpenSSL 1.0.1g from 1.0.1e.

Bug Fixes

  • Fixed an issue that would cause New Relic cross application tracing headers to accumulate during multiple curl_exec() calls.
  • Fixed an issue with the installer when the path includes spaces. When was run from a path that included spaces, such as /tmp/new relic/newrelic-php5-, the installation would fail. This has been corrected.

  • Fixed an issue where not all Drupal 8 hooks were instrumented.

    While most Drupal 8 hooks are executed via ModuleHandlerInterface::invoke() and ModuleHandlerInterface::invokeAll(), a handful such as page_build are executed via variable functions by Drupal 8 as they require their arguments to be passed by reference. These hooks are now instrumented correctly.