How does Dynatrace monitor PHP applications?

PHP is a server-side scripting language particularly well-suited for web development but also popular in general-purpose programming. Originally created by Rasmus Lerdorf in 1994, new versions are now produced by The PHP Group.

PHP is processed by a PHP interpreter implemented in:

  • Apache web server
  • Common Gateway Interface (CGI) executable
  • Command-line Interface (CLI)

The most common ways to run PHP on a web server are:

  • mod_PHP—The default on vanilla Apache HTTP servers. PHP is run as an Apache module, meaning that a PHP request is run under the Apache process. This makes PHP perform well, but flexibility is limited by the Apache configuration, permissions, restrictions, etc.
  • PHP_FPM—FastCGI Process Manager (FPM) uses pool management to optimize performance. Every pool acts as a standalone PHP instance, enabling you to create an independent configuration per pool, which provides granular control and greater flexibility. This is the fastest performing method to run PHP.

Capabilities

Dynatrace provides extensive PHP monitoring capabilities:

  • All database statements and SQL metrics
  • Compilation, execution, and response time analysis
  • Detailed request and response metrics
  • Information about restarts, crashes, and deployment changes
  • Insight into stack issues (like stack overflow)
  • Automatically collected PHP-FPM metrics
  • Location of hotspots at the code level
  • Analysis of requests to external services via CURL, SOAP interfaces and other remote interfaces like fopen, or get_file_contents

See Which environments and versions does Dynatrace support? for details on supported technologies used in conjunction with PHP.

Support and desupport

The different PHP versions have support timelines defined by PHP. Please refer to Supported PHP versions at php.net to see which versions are currently supported by PHP and when end of support for each version is planned.

  • Deprecated versions don't receive updates or security patches, so running them in production should be avoided.
  • Dynatrace is committed to supporting each PHP version for at least as long as the vendor supports it (in most cases, support extends for at least six months beyond this point).
PHP version Vendor release Vender EOL Supported by Dynatrace until Last supported agent version
5.3 30 June 2009 21 July 2016 November 2018 135
5.4 1 March 2012 3 September 2015 November 2018 135
5.5 20 June 2013 21 July 2016 November 2018 135
5.6 28 August 2014 31 December 2018 End of June 2019
7.0 3 December 2015 3 December 2018
7.1 1 December 2016 1 December 2019
7.2 30 November 2017 30 November 2020

When Dynatrace OneAgent detects an unsupported PHP version, we exclude it from monitoring and display a warning in the process overview page:

Activation of deep monitoring was unsuccessful
Process version is not supported

PHP Monitoring Process version not supported

We also write the message to the error logs on the host machine.

See Which environments and versions does Dynatrace support? for details on supported technologies used in conjunction with PHP.

Known limitations

  • CLI monitoring is turned off by default, because, during a short-lived CLI execution, injection overhead may make up a large percentage of the whole runtime. You should refrain from using CLI monitoring when threading and forking is used for the monitored application, as these features aren't supported.
  • CGI monitoring for Windows is on its way to Dynatrace. At this point, there is no differentiation between CGI and Fast-CGI; these are reported as a single type: CGI.

Further readings