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

Tuesday, August 23, 2016 - 11:20

New Features

  • Support has been added for Laravel 5.3.

  • Experimental Laravel Queue support.

    Experimental support for the Laravel Queue component has been added. This supports all versions of Laravel from 4.0 to 5.3, inclusive.

    Whether run via artisan queue:listen or artisan queue:work, queue workers will now generate a separate background transaction for each job that is processed. These transactions will be named with the class name of the job, or IlluminateQueueClosure if a closure was queued.

    Additionally, a transaction that queues one or more jobs will be linked to the background transaction(s) that processed those jobs on the transaction map in the New Relic UI.

    To enable this support, you will need to set the laravel_queue feature flag in newrelic.ini. For most users, this will simply involve adding this line:

    newrelic.feature_flag=laravel_queue

    As this is presently an experimental feature, we would welcome feedback — both positive and negative — on whether this feature helps users using the Laravel Queue component better visualise the structure and performance of their applications.

    If all goes well, it is anticipated that Laravel Queue support will be enabled by default in a future version of the agent.

Upgrade Notices

  • Symfony 1 transactions that generate 404 errors due to no routes being matched will now be named based on the module and action that are actually used, rather than the module and action inferred from the request URL. In most cases, this will result in the transaction name being based on the error_404_module and error_404_action Symfony settings.

    Note that, as a result of this change, if the configured 404 action calls sfAction::forward() to forward to another action, the transaction name will be based on the final action. All other uses of sfAction::forward() are unaffected.

Bug Fixes

  • Previously, calling PDO::query with more than one argument resulted in the query being counted under the 'other' category on the Datastores page in the New Relic UI. This has been fixed. The agent will now correctly categorize the query as 'select', 'insert', 'update', or 'delete'.

  • Previously, calling PDO::query with more than one argument resulted in the agent reporting "(unknown sql)" if the query was slow. (i.e., it exceeded the threshold given by the newrelic.transaction_tracer.explain_threshold setting.) This has been fixed.

  • Previously, calling SQLite3::querySingle with two arguments resulted in the query being counted under the 'other' category on the Datastores page in the New Relic UI. This has been fixed. The agent will now correctly categorize the query as 'select', 'insert', 'update', or 'delete'.

  • Previously, calling SQLite3::querySingle with two arguments resulted in the agent reporting "(unknown sql)" if the query was slow. (i.e. It exceeded the threshold given by the newrelic.transaction_tracer.explain_threshold setting.) This has been fixed.

  • Transient Magento 2 tables now have the unique numbers removed from their names to avoid metric grouping issues.

  • Pressflow 6 applications were incorrectly detected as Drupal 7 applications. This could cause POST requests made using drupal_http_request to be converted into GET requests. This has been fixed.

  • Explain plan generation is now always performed on a separate database connection. This has been changed to avoid issues when using MySQL's SELECT FOUND_ROWS() feature.

  • Previously, instrumenting method calls that resolved to __call() or __callStatic() calls could result in crashes on PHP 7. This primarily manifested in crashes for users of certain WordPress plugins (for example, wp-external-links) that registered hooks or actions that used magic methods. This has been fixed.

Thursday, July 28, 2016 - 12:00

New Features

Bug Fixes

  • The behavior of the installer when attempting to detect PHP installations has been tightened up. Previously, a directory structure such as /usr/local/php/php/* would be detected as an installation of PHP in /usr/local/php, as the nested php directory would be wrongly assumed to be a PHP CLI binary. The installer now checks if the nested php (or php-config) is a directory, and ignores the path if so.

    Although this is likely to improve the installer in multiple environments, most noticeably, this fix removes erroneous messages about there being multiple PHP installations when installing the PHP agent within the Docker Hub's official PHP images.

  • Spurious messages like ALERT: oops, unknown child could appear in the PHP FPM log when a New Relic daemon process was started. This has been fixed.

Tuesday, June 14, 2016 - 10:55

New Features

  • Ignore Errors

    A new newrelic.error_collector.ignore_errors setting has been added. When configured, this setting can be used to prevent errors, such as E_WARNING, from being reported to New Relic. This setting does not affect errors reported via the newrelic_notice_error API.

  • Ignore Exceptions

    A new newrelic.error_collector.ignore_exceptions setting has been added. This setting accepts a comma-separated list of fully-qualified class names. When an uncaught exception occurs, the agent will not report the exception to New Relic if it is an instance of a class in this list. This setting does not affect errors reported via the newrelic_notice_error API.

Upgrade Notices

  • Guzzle support is now enabled by default. It can be disabled by setting the new newrelic.guzzle.enabled setting to false.

    The guzzle feature flag that was previously used to enable Guzzle support is now ignored.

Bug Fixes

  • The first request in each PHP process would remove any output handlers installed using the output_handler configuration setting for users of PHP 5.4 and later. This has been fixed: existing output handlers will now remain untouched.

  • Transient WordPress hooks now have the unique numbers removed from their names to avoid metric grouping issues.

  • In cases where WordPress' WP_CONTENT_DIR directory was set to a custom value, WordPress plugin metrics were not reported on PHP 5.2 to 5.4, inclusive. This affected users of the popular WP-Skeleton project. This has been fixed.

  • A regression in version 6.3 could cause Guzzle 6 users to lose support for cross application tracing and service maps, in particular when Guzzle 6 was autoloaded as a result of instantiating the only GuzzleHttp\Client object used within the lifetime of the script. This has been fixed.

Wednesday, May 18, 2016 - 10:55

New Features

  • Support for Postgres prepared statements has been added when the pg_prepare and pg_execute functions are used. The agent will now report Datastore metrics as well as capture slow queries.

Bug Fixes

  • Added a workaround for a stack corruption bug in very old versions of the Suhosin extension when used with PHP 5.3 or higher. The bug exists in Suhosin 0.9.29 and older versions only. Newer versions are not affected.

  • Automatic transaction naming could fail in certain circumstances on Laravel 4.1 or higher on PHP 5 when a before route filter was installed. This has been fixed.

  • Automatic transaction naming could fail on Laravel 5.x when a global middleware handled the request without forwarding it deeper into the application. For example, the default Authenticate middleware returns a 401 Forbidden response to unauthenticated requests, preventing proper transaction naming. This has been fixed.

  • A segfault could occur in memory constrained environments, particularly on PHP 7. This has been fixed.

Monday, May 2, 2016 - 12:00

New Features

  • We're proud to announce initial support for Alpine Linux 3.1 and newer. Currently, manual installation is required.
Tuesday, April 12, 2016 - 13:37

New Features

  • The PHP agent now has support for Doctrine 2 DQL Queries. When running a DQL query, it will appear alongside the SQL in both Slow SQLs and Transaction Traces.

Notes

  • The agent now includes attributes for HTTP response headers in web transactions:
    • response.headers.contentType
    • response.headers.contentLength

Bug Fixes

  • newrelic.transaction_events.enabled wasn't being observed. This has been fixed.

  • The PHP in SUSE and OpenSUSE Linux was incompatible with some of the agent's features, including RUM and CAT. This issue has been fixed.

Thursday, March 17, 2016 - 10:10

New Features

  • Support has been added for Magento 2.

Bug Fixes

  • Support for Laravel 5.2 has been added. Previously, Laravel 5.2 applications would fail to start with a BadMethodCallException. This was due to the agent's attempted use of a route filter for automatic transaction naming. Automatic transaction naming for Laravel 5.2 no longer relies on a route filter preventing the error. Automatic transaction naming for older versions of Laravel is unaffected.

  • Calling phpversion("newrelic") could return "unreleased" instead of the actual version number. In turn, this caused composer show --platform to report a version of 0. This has been fixed. The version number reported by phpinfo() was not affected by this bug.

  • Fixed a potential segfault when using Zend_Http_Client under PHP 5.5 or 5.6 with OPcache enabled.

Wednesday, March 9, 2016 - 10:39

Bug Fixes

  • Fixed a bug that could cause segfaults on PHP 7.0 when a __call() method was invoked and was slow enough to generate a trace node.
Monday, March 7, 2016 - 10:55

New Features

  • Support has been added for PHP 7.0.
Thursday, February 18, 2016 - 10:55

New Features

  • The agent will now gather more information about the host system, including whether the system is running on Docker or AWS. This will be used to support upcoming features.

Notes

  • We've changed the timestamp source for error events, which drive the Error Analytics page. Previously, the event's timestamp was the transaction's start time. It is now the time when the error occurred.
Tuesday, January 26, 2016 - 11:15

New Features

  • Experimental support for instrumenting Guzzle has been added.

    We are very pleased to announce that we've added experimental support for instrumenting Guzzle 3, 4, 5, and 6. Requests made using Guzzle will now show up as externals in the same way as requests made using other instrumented libraries, like curl, drupal_http_request(), and file_get_contents().

    To enable the experimental support, you will need to add a feature flag to your newrelic.ini: newrelic.feature_flag = guzzle. NOTE: We intend to enable the Guzzle support by default in a future release.

    More information can be found on our Guzzle documentation page.

Tuesday, January 19, 2016 - 10:30

New Features

  • WordPress tab in the New Relic UI

    We're pleased to announce a new UI tab just for WordPress-specific data! WordPress applications now show information about their hooks, plugins, and themes.

    For more information, see WordPress-specific functionality.

Tuesday, December 15, 2015 - 13:30

New Features

  • On Linux, abstract sockets are now supported for agent to daemon communication. An abstract socket can be created by prefixing the value of the port setting in your newrelic.ini file (e.g. newrelic.daemon.port = "@newrelic-daemon") or newrelic.cfg file (e.g. port = "@newrelic-daemon").

  • The daemon can now be passed a --define <setting>=<value> flag that allows setting arbitrary parameters from your newrelic.cfg file. These parameters will take precedence over settings from that file.

  • Drupal 8 requests that are successful full page cache hits for anonymous users (handled by Drupal\page_cache\StackMiddleware\PageCache) are now given the name WebTransaction/Action/page_cache.

  • Support for automatically naming transactions has been added for Symfony 2.8 and 3.0.

  • Support for automatically naming transactions has been added for MediaWiki 1.18.0 and newer.

Upgrade Notices

  • It is now possible to disable reporting of errors for exceptions that are handled by an exception handler installed with set_exception_handler() by enabling the newrelic.error_collector.ignore_user_exception_handler setting.

  • Calls to newrelic_notice_error with improper parameters will no longer record an error with the message "?". Instead, no error will be recorded. newrelic_notice_error will now return true if an error is saved, null if the arguments are invalid, and false otherwise. If newrelic_notice_error is called with two parameters and the second parameter is not a valid exception, no error will be recorded: The first parameter is now entirely unused.

Bug Fixes

  • On Redhat Enterprise Linux 7 and related systems such as CentOS and Fedora, the systemctl start|stop newrelic-daemon commands were not working due to a bug in the newrelic-daemon init script when executed by systemd. This has been fixed.

  • On some Linux systems, an SELinux policy could prevent the newrelic-daemon from determining the correct hostname. Affected systems were unable to report data because a valid hostname is required by New Relic. This has been fixed. This issue could also prevent the newrelic-daemon from determining the correct hostname when running in a chrooted environment, or any environment in which access to the /proc filesystem is limited.

  • Detection of Zend Framework 2.5 and later was unreliable when the framework was installed via Composer. This has been fixed.

  • Detection of Laravel 5.1 and later was unreliable when artisan optimize was used. This has been fixed.

  • The agent now sends the attribute request.headers.contentLength as an integer rather than a string.

Tuesday, November 17, 2015 - 10:11

New Features

With this release, the agent reports TransactionError events. These new events power the beta feature Advanced Analytics for APM Errors (apply here to participate). The error events are also available through New Relic Insights.

Monday, November 9, 2015 - 11:30

New Features

  • To easily distinguish dynamically assigned hosts, users can now assign a display name to a host with the setting newrelic.process_host.display_name.
  • The New Relic PHP Agent now supports the latest Production Release of 64-bit FreeBSD, which is currently at 10.2-RELEASE.

Upgrade Notices

  • Transactions run under PHP's CLI Web server will now report as Web transactions instead of background transactions. If you want the agent to continue reporting them as background transactions, use the newrelic_background_job() API function to mark the transaction as a background job.

Notes

  • The agent now collects the following information in web transactions (not yet shown in the New Relic UI): Accept, Host, Content-Length, and Content-Type HTTP request headers, and HTTP request method.
Monday, October 26, 2015 - 09:08

New Features

  • Users can now delete applications from the UI after 20 minutes of inactivity. Previously, this required a restart of the New Relic PHP daemon.

Upgrade Notices

  • We rearchitected the daemon to enable future improvements.
  • Daemon log levels are now simpler. While verbose and verbosedebug will still work, debug now gives you all the debugging information. Agent log levels remain unchanged.

End of Life Notices

  • For the few customers who start the daemon manually, the newly renamed command-line flags can be found with the -h or --help flags. The following old flags will be removed in a future release:
    • [-p pidfile]
    • [-d level]
    • [-c config]
    • [-l logfile]
    • [-P port]
    • [-s]
    • [-n]
    • [-b SSL-certificate-bundle]
    • [-S SSL-certificate-path]
    • [-H host]
    • [-x proxy]
    • [-a auditlog]
Friday, July 24, 2015 - 14:21

Bug Fixes

  • A memory leak that could occur when a large number of PDO or mysqli statements were prepared and executed has been fixed.
Monday, July 20, 2015 - 14:21

Bug Fixes

  • This release fixes a rare bug where applications that had the ionCube loader enabled and called set_exception_handler() repeatedly could crash.

New Features

  • Exceptions that are ignored by Laravel 5's default exception handler will also now be ignored by the PHP agent's error reporting feature. This can be controlled by adding or removing entries in the dontReport property of Laravel's default exception handler, as described in the Laravel documentation.
Friday, July 10, 2015 - 16:13

Bug Fixes

  • Under certain circumstances, version 4.23.0 of the PHP agent could crash when newrelic_set_appname() or newrelic_end_transaction() were called and a custom exception handler had been installed via set_exception_handler(). This has been fixed.

  • Under certain circumstances, Drupal applications that rely on the newrelic_set_appname() API function to start transactions would not see the Drupal tab in the New Relic UI. This has been fixed.

Wednesday, July 8, 2015 - 12:37

New Features

  • Exceptions that are uncaught and handled only by a last resort exception handler installed via set_exception_handler() will now generate errors that can be viewed in the APM UI. Previously they would not be sent to New Relic at all.

    As a result of this, some customers will see more errors in the APM UI than they had previously seen.

Bug Fixes

  • In certain circumstances, such as an exception being thrown during database connection, errors generated by uncaught exceptions could result in the stack trace shown in APM including function argument values, which could potentially expose database passwords and other sensitive information. This problem has been fixed.

    We now catch these formerly-uncaught exceptions and thus have control over how the stack trace is built, ensuring that function argument values will no longer show up in those stack traces.

Pages