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 de-Support

Dynatrace desupports PHP versions deprecated by the PHP project up to the end of the calendar year.

We strongly recommend that you use supported PHP versions. Deprecated versions don't receive updates and security patches.

For detailed information on PHP support, see Supported PHP versions at php.net.

PHP support matrix

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.

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