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.

Wednesday, September 4, 2019 - 10:30 Download

New Features in 9.1

Symfony 4 support added.

Web transactions that use the Symfony 4 framework will now be automatically named based on the route or controller name.

Upgrade Notices

  • Requests handled by PHP-FPM that result in a 404 error because the script does not exist, or a 403 error because PHP-FPM does not have permission to access the script, will now result in a transaction called 404 or 403, respectively, rather than being named after the request URI. This change was made to prevent metric grouping issues, particularly when sites are being probed by potential attackers.

    If you wish to capture the actual request URI for analysis, it can be attached to the transaction event under the request.uri attribute using the following configuration setting: newrelic.transaction_events.attributes.include=request.uri

Bug Fixes

  • In version 9.0, Guzzle and Predis execution time could be double counted on application overview and transaction charts in APM, as time could be attributed to both PHP execution and the external or datastore time, respectively. This has been fixed, and charts should now revert back to their previous behaviour.

  • Restarting a transaction from within a Drupal or WordPress hook could result in a segfault. This has been fixed.

Monday, August 19, 2019 - 10:30 Download

Notes

  • A bug that could result in segfaults when transactions were restarted (either directly through newrelic_start_transaction() or indirectly through newrelic_set_appname()) was fixed.

    This also affected customers using Laravel Queue instrumentation, as this uses transaction restarts internally.

  • PHPUnit may not have been detected on case sensitive filesystems on 9.0.0. This has been fixed.

  • A bug that could result in segfaults for CodeIgniter applications on PHP 7 when call_user_func_array() inlining failed was fixed.

Thursday, August 8, 2019 - 11:30 Download

New Features in 9.0

Detailed transaction traces now available when distributed tracing is enabled.

This release includes a refactor of segment storage to allow the agent to sort and apply different prioritization of segments that are used for transaction traces instead of distributed tracing. The PHP agent 8.4 release included limited support for distributed tracing, which resulted in the loss of detailed transaction traces for individual PHP services when distributed tracing was enabled.

The refactor in this new release allows the agent to send up the segments (spans) you want to view for a distributed trace that includes PHP services. It also separately provides as much segment detail as possible when exploring transaction traces for an individual PHP service.

Notes:

  • The instructions to enable distributed tracing have not changed with this release.
  • The behavior of newrelic.transaction_tracer.detail has changed when distributed tracing is on. In the 8.4 - 8.7 PHP agent releases, newrelic.transaction_tracer.detail was disabled when distributed tracing was enabled. That is no longer the case. For more information, see the documentation for configuring trace level detail when using distributed tracing.
  • To enable the improved support for distributed tracing, the PHP agent's memory allocation strategy has changed in 9.0. The PHP agent will more aggressively allocate memory when a transaction starts, and the system allocator may choose not to release that memory back to the operating system immediately, depending on the configuration of the operating system kernel and C library. As a result, the memory usage of the PHP processes may now be higher than it was with previous versions of the PHP agent.

Upgrade Notices for 9.0

With these distributed tracing enhancements, please check threshold values.

  • In the 8.4 - 8.7 PHP agent releases, we recommended that customers set newrelic.transaction_tracer.threshold = 0 so that the agent would report complete distributed traces even when a lightweight PHP service was part of the trace. This is no longer necessary.
  • When upgrading to the 9.0 release, we recommend that you review your newrelic.transaction_tracer.threshold settings, and return this value to its default or some higher value that is sensible for the application.

The daemon will now issue a warning if it cannot find a root certificate bundle on startup.

  • The daemon includes its own certificates and will still operate, but a future version of the PHP agent will remove the built-in certificates. At that point the PHP agent will not be able to communicate with New Relic's servers.
  • Recommendation: Ensure ensuring that a root certificate bundle is installed on your host or in your container before using the PHP agent. This is generally available on most Linux distributions as a ca-certificates package. On FreeBSD, a bundle is available via the security/ca_root_nss package in ports.

The daemon may no longer be invoked with the --tls flag.

  • As of PHP agent version 8.0.0 the newrelic.daemon.ssl ini setting had been removed to increase security, but you could still invoke the daemon from the command line with --tls true. Command-line invocations of the daemon with the --tls flag will cause the invocation to fail.
  • As with all PHP agent versions since 8.0.0, TLS is always used for communication with New Relic servers.

Bug Fixes

  • A potential segfault when using drupal_http_request under PHP 7.3 has been fixed.
  • In some cases, starting a new transaction during a request (via newrelic_start_transaction or newrelic_set_appname) could result in an incomplete state of framework and user function instrumentation.
  • When obfuscating SQL, comments are stripped without any loss of the SQL itself.
  • Predis 0.8 commands that used the synchronous executeCommand() code path (for example, HSET) on a clustered connection did not generate metrics. This has been fixed.
Thursday, March 14, 2019 - 11:35 Download

Bug Fixes

  • Transaction globals are now cleanly separated from request globals. This fixes crashes related to the initialization of multiple transactions during one request (mostly triggered by newrelic_set_appname()).
Thursday, March 14, 2019 - 02:00 Download

New Features

  • Support Laravel's handling of CORS HTTP OPTIONS.
    Requests for Laravel's built-in automatic handling of CORS HTTP OPTIONS requests will now be given the transaction name _CORS_OPTIONS.

Bug Fixes

  • A potential segfault when using PHP 7.3, opcache and multiple PHP workers has been fixed.
  • Uncaught exceptions within a job being executed by a Laravel Queue worker are now reported correctly.
  • Invoking function_exists() on a function disabled with the disable_functions configuration directive will now correctly return false.
Wednesday, December 19, 2018 - 01:00 Download

New Features

  • Added support for PHP 7.3.
    Keeping up with the latest and greatest from the PHP Core team, the New Relic PHP Agent now supports PHP 7.3.
  • Distributed Tracing Improvements!
    The PHP Agent's Distributed Tracing support (introduced in version 8.4 of the PHP Agent) now includes the `http.method` attributes for External spans.
  • Up to date PHPUnit support.
    The PHP Agent now supports automatic creation of custom events for PHPUnit 6, PHPUnit 7, and PHPUnit 8. You can read more about PHPUnit support (and more) over on the New Relic Blog.
Wednesday, December 5, 2018 - 11:00 Download

New Features

  • Support for Distributed tracing

    Distributed tracing lets you see the path that a request takes as it travels through your distributed system. By showing the distributed activity through a unified view, you can troubleshoot and understand a complex system better than ever before.

    Distributed tracing is available with an APM Pro or equivalent subscription. To see a complete distributed trace, you need to enable the feature on a set of neighboring services. Enabling distributed tracing changes the behavior of some New Relic features, so carefully consult the transition guide before you enable this feature.

    To enable distributed tracing, two parameters should be changed in the newrelic.ini file:
    newrelic.distributed_tracing_enabled = true
    and
    newrelic.transaction_tracer.threshold = 0

    Read more about about distributed tracing in the PHP Agent.

Bug Fixes

  • A bug in the PHP agent resulted in databaseCallCount attributes no longer being attached to Transaction events. The 8.4 release restores these attributes.
  • Predis 2 cluster connections could not be instrumented due to internal changes in Predis. The 8.4 release fixes this.
Monday, October 15, 2018 - 11:00 Download

Bug Fixes

  • In rare cases, during a reset of the apache web server, the agent and mod_php would hang with 100% CPU utilization. This has been fixed.
Wednesday, September 5, 2018 - 12:00 Download

Bug Fixes

  • Fixed an entire category of bugs where a Drupal hook whose hook name matched its module name resulted in the generation of empty metric names.

Operating Systems Support

  • This release of the PHP Agent removes support for the Solaris operating system. For Solaris support, please install agent version 8.1 or prior.
Monday, April 30, 2018 - 12:00 Download

Upgrade Notices

  • The PHP Agent API call newrelic_set_appname has been updated with security improvements in anticipation of future releases.
Monday, March 12, 2018 - 15:44

Upgrade Notices

  • The newrelic.daemon.ssl ini setting has been removed to increase security. Transport Layer Security (TLS) will now always be used in communication with the New Relic collector.
  • Laravel Queue support has now been enabled for all users. If newrelic.feature_flag=laravel_queue is set, it will now be ignored.

Bug Fixes

  • On FreeBSD and Solaris, when newrelic.daemon.port is configured to use TCP to connect the agent to the daemon, the agent would have difficulty receiving application configuration data from the daemon due to the default timeout of 100 milliseconds matching the delay enforced by the FreeBSD kernel as part of its implementation of Nagle's algorithm. The PHP agent will now set the TCP_NODELAY flag when connecting to the daemon via TCP, which increases the reliability of the agent:daemon connection.
Wednesday, January 10, 2018 - 10:45

New Features

  • Support for PHP 7.2 has been added.

Bug Fixes

  • Datastore metrics would not be generated for Predis users who stopped and started the transaction after instantiating a Predis\Client object. This included users using the newrelic_set_appname() API. This has been fixed.
Tuesday, October 10, 2017 - 11:45

New Features

  • Internal functions can now be instrumented by enabling the newrelic.transaction_tracer.internal_functions_enabled configuration setting. When enabled, internal functions will appear in transaction traces like PHP functions.

    Note that enabling this option may result in transactions being slower, especially when collecting many traces from PHP 5.x. Enabling this option is only recommended when specifically debugging performance issues where an internal function is suspected to be slow.

Bug Fixes

  • In some cases, Magento 2's UI Component JSON data sources return with an (incorrect) Content-Type of text/html. This resulted in auto instrumentation insertions into JSON data that contained a <head> string. We now identify these specific JSON data sources and ensure the auto instrumentation is not inserted into this JSON data.

  • On PHP 7, using file_get_contents() to get a HTTP URL in a function which also read from $http_response_header resulted in the external call not being linked correctly in the APM UI: the external call would appear in transaction traces without a link to the receiving application. This has been fixed.

  • Using curl_setopt_array() to set options on a cURL handle could result in cross application tracing failing. This has been fixed.

  • When generating explain plans for queries issued with MySQLi, the PHP agent could bind parameters from the wrong query if the PHP object ID had been reused internally. This has been fixed.

  • Due to a change in Laravel 5.5's router API, the PHP agent would crash when automatically naming a Laravel transaction. This has been fixed.

  • On PHP 7, when naming transactions for the Laravel 5 framework, well-formed transaction names were being replaced by the too-generic $METHOD/index.php. This has been fixed.

  • Invoking newrelic_record_datastore_segment() before the PHP agent had connected to New Relic would result in the query callback silently failing to execute. This has been fixed; the callback will always be invoked provided parameters of the correct type are given to the function, otherwise an E_WARNING will be generated.

Tuesday, August 29, 2017 - 10:30

New Features

  • A new API function for timing datastore functions that the PHP agent doesn't natively instrument has been added: newrelic_record_datastore_segment(). Documentation and usage examples can be found on the New Relic Documentation site.

  • The agent now collects additional metadata when running within AWS, GCP, Azure, and PCF. This information is used to provide an enhanced experience when the agent is deployed on those platforms.

Bug Fixes

  • On Laravel 5.4, previous versions of the PHP agent named transactions handled by routes without explicit names based on the request method and front controller name, instead of using the route URI as with other versions of Laravel. This has been fixed, and automatic transaction names are once again consistent across all Laravel versions.

  • When generating explain plans for queries issued with MySQLi, the PHP agent could bind parameters from the wrong query if the PHP object ID had been reused internally. This has been fixed.

Wednesday, July 5, 2017 - 10:00

Bug Fixes

  • On the first request served by a PHP process, a Drupal 6 or 7 hook that was invoked with module_invoke() before it had been invoked by module_invoke_all() could have its module name reported as an empty string. This has been fixed.

  • On PHP 7.0 and 7.1, a Drupal 6 or 7 hook invoked via module_invoke_all() could report the module name as an empty string in some situations. This has been fixed.

Tuesday, June 27, 2017 - 16:50

Bug Fixes

  • Users of Guzzle 4 or 5 may have seen crashes in version 7.3.0 of the PHP agent due to a bug in the agent's request shutdown instrumentation for that library. This has been fixed.
Monday, June 26, 2017 - 10:20

Upgrade Notices

  • Laravel Queue instrumentation has been updated to better interoperate with other New Relic APM features. It is possible that messages sent from PHP installs running version 7.3 (or later) of the PHP agent may not be correctly linked to the message queue worker transaction if the worker is running with version 7.2 or earlier of the PHP agent.

    If you use the Laravel Queue instrumentation, we recommend ensuring that all agents used to produce and consume messages are upgraded to version 7.3 simultaneously to avoid unexpected service map issues.

Bug Fixes

  • Compatibility with extensions that install opcode handlers on PHP 7 has been improved, most notably with uopz. While we still do not recommend using other extensions that hook deeply into PHP (such as uopz, runkit, or xdebug) with the New Relic PHP agent, this change should result in improved functionality.

  • A potential segfault when using Predis in a session handler invoked at request shutdown has been fixed.

  • External requests issued using Guzzle 6 are now properly instrumented when the GuzzleHttp\Client class has been extended.

Wednesday, April 19, 2017 - 10:00

Upgrade Notices

  • Users of the newrelic-php5 Debian package with PHP 5.2: due to discontinued support of PHP 5.2, upgrading to version 7.x of the PHP agent may result in your applications no longer reporting to New Relic. We advise that you upgrade to a supported version of PHP.

    If upgrading PHP is not possible, you can use apt-get and dpkg to install version 6.9 of the PHP agent and then hold that installed version by running these commands as root:

    apt-get update
    apt-get upgrade newrelic-php5-common=6.9.0.182 newrelic-daemon=6.9.0.182 newrelic-php5=6.9.0.182
    echo 'newrelic-php5-common hold' | dpkg --set-selections

Bug Fixes

  • Automatic transaction naming has been fixed for Symfony 1 users who replaced the controller class via factories.yml with one that did not call sfFrontWebController::dispatch() or sfController::forward().

  • Datastore metrics could not be generated for Predis 0.7 and 0.8 in version 7.1 of the PHP agent. This has been fixed.

  • The agent would not report Zend_Http_Client external calls when the Zend Framework was used directly as a library or indirectly by a framework like Symfony or Magento. This has been fixed.

Thursday, March 23, 2017 - 10:35

New Features

  • Added support for the MongoDB library

    The PHP agent now supports the MongoDB userland library, which is the recommended interface to the mongodb extension. Users of this library will see new metrics in the Databases tab, nodes in transaction traces, and breakdown metrics on individual transaction pages.

  • Database instance information available for Redis, Predis, and MongoDB

    Queries and commands issued using the PECL Redis extension, the Predis library, and the MongoDB library now capture instance information. Transaction traces now include the name of the host (including the port or socket) and database that the query was run against.

    Collection of host information can be disabled by setting newrelic.datastore_tracer.instance_reporting.enabled = false in the newrelic.ini. Similarly, the database name can be omitted with newrelic.datastore_tracer.database_name_reporting.enabled = false.

Upgrade Notices

  • Commands in Predis pipelines are now reported individually, rather than being rolled into a single pipeline query.

Bug Fixes

  • When using PHP 7.0 or 7.1, calling curl_setopt() with the CURLOPT_HTTPHEADER option and an array with elements that have been accessed by reference (for example, with foreach ($array as $k => &$v)) would result in the headers used by New Relic to track external calls overwriting other custom headers. This has been fixed.
Tuesday, February 21, 2017 - 09:35

New Relic PHP Agent Release Notes

End of Life Notices

  • The New Relic PHP agent no longer supports PHP 5.2. New Relic highly encourages upgrading to a supported version of PHP - 5.6 or higher. If you would like to continue running the New Relic PHP agent with PHP 5.2, we recommend using version 6.9 of the agent, however please note that we can only offer limited support in this case.

New Features

  • Automatic transaction naming for Magento 2 has been improved. Previously, only requests that were handled by Magento's normal routing were automatically named, which resulted in request types that utilized Magento's interceptor/plugin functionality being named as unknown. This primarily affected users of the REST or SOAP web services.

    REST and SOAP requests will now be named in the Webapi/Rest and Webapi/Soap namespaces, respectively, and will be named according to the service class and method that handle the request.

    Third party modules that add an interceptor on Magento\Framework\App\FrontControllerInterface to override the dispatch() method will result in transaction names that are based on the interceptor class name. New Relic recommends using the newrelic_name_transaction() API function from within the module to name the transaction if you require more precision.

Pages