Apache2handler
Apache2handler is the PHP Server API (SAPI) used when PHP is built as an Apache 2.x module, allowing PHP code to run inside the Apache process as mod_php. It provides in-process execution of PHP scripts, enabling direct integration with the Apache request handling pipeline without invoking an external gateway interface.
Apache2handler is compiled into PHP as an Apache module or loaded as a shared object (for example,
The Apache2handler SAPI is commonly used with the prefork MPM, where each request is handled by a
Performance and resource considerations
As an in-process SAPI, Apache2handler can offer low latency and high through‑put for PHP requests, but it
While still supported in many setups, Apache2handler has contrast with more scalable patterns such as FastCGI
See also: PHP, Apache HTTP Server, SAPI, mod_php, FastCGI, PHP-FPM, Apache 2.x.