Home

modphp

Mod_php is an Apache HTTP Server module that embeds the PHP interpreter into the web server. When enabled, PHP code within files with .php is executed by PHP inside the Apache process, rather than by a separate interpreter process.

Implementation and operation: The module is loaded as a dynamic shared object (for example libphp7.so) at server

Security and isolation: Since PHP runs in the web server process, a PHP crash or exploit can

Modern usage and alternatives: While mod_php remains widespread on older or simpler deployments, many setups now

startup
and
configured
to
handle
PHP
requests.
It
is
most
compatible
with
the
prefork
multi-processing
module
(MPM)
of
Apache,
but
can
be
used
with
some
threaded
MPMs
when
PHP
is
built
with
thread
safety.
Because
the
PHP
interpreter
runs
inside
Apache
worker
processes,
memory
usage
scales
with
concurrent
requests;
this
can
limit
the
total
concurrent
connections
on
busy
sites.
affect
the
entire
server
and
all
virtual
hosts
sharing
the
same
Apache
process.
This
has
led
system
administrators
to
favor
separate
PHP
runtimes
(such
as
PHP-FPM)
for
isolation
and
performance
on
modern
deployments.
use
PHP-FPM
(FastCGI
Process
Manager)
with
Apache
via
proxy
or
a
separate
FastCGI
handler.
This
allows
per-site
or
per-tenant
isolation
and
easier
scaling,
and
it
enables
running
multiple
PHP
versions
concurrently.
Some
distributions
still
provide
mod_php
packages
for
convenience.