PHP-FPM(8)

πŸ“¦ version 8.3.36, in alpine 3.24

πŸ’… PHP-FPM(8) β€” the php-fpm page, but make it make sense

okay bestie, welcome to the php-fpm manual page β€” that's the PHP FastCGI Process Manager, aka the thing that actually keeps your PHP running in the background so your webserver can vibe. this is the PHP-FPM(8) page and i'm gonna walk you through every single flag like we're studying together at 2am 🫢

✨ NAME ✨

php-fpm β€” PHP FastCGI Process Manager, a.k.a. 'PHP-FPM' πŸ‘‘

✨ SYNOPSIS ✨

php-fpm [options]

that's it. that's the whole summoning ritual. ✨

✨ DESCRIPTION ✨

okay so PHP is this hugely popular general-purpose scripting language, and it's especially built for Web development and can be embedded into HTML. no cap, it's everywhere.

php-fpm is a variant of PHP that runs in the background as a daemon, just listening for CGI requests like a very patient bestie. output gets logged to /var/log/php-fpm.log πŸ“

most of the actual settings live in the config file, and that file is /etc/php83/php-fpm.conf. by default, php-fpm responds to CGI requests by listening on localhost http port 9000. so php-fpm expects your webserver to forward all requests for .php files to port 9000 β€” meaning yes, you should go edit your webserver config file appropriately. it's giving teamwork, honestly 🀝

✨ OPTIONS ✨

  • -C β€” do NOT chdir to the script's directory
  • --php-ini path|file, -c path|file β€” look for the php.ini file in the directory path, or just use the specified file
  • --no-php-ini, -n β€” no php.ini file will be used at all, we're going feral πŸ™ˆ
  • --define foo[=bar], -d foo[=bar] β€” define the INI entry foo with value bar
  • -e β€” generate extended information for debugger/profiler
  • --help, -h β€” this help πŸ’–
  • --info, -i β€” PHP information and configuration
  • --modules, -m β€” show compiled in modules
  • --version, -v β€” version number
  • --prefix path, -p β€” specify an alternative prefix path (the default is /usr)
  • --pid file, -g β€” specify the PID file location.
  • --fpm-config file, -y β€” specify an alternative path to the FastCGI process manager configuration file (the default is /etc/php83/php-fpm.conf)
  • --test, -t β€” test the FPM configuration file and exit. if you call it twice (-tt), the configuration is dumped before exiting πŸ“‹
  • --daemonize, -D β€” force it to run in the background and ignore the daemonize option from the configuration file.
  • --nodaemonize, -F β€” force it to stay in the foreground and ignore the daemonize option from the configuration file.
  • --force-stderr, -O β€” force output to stderr in nodaemonize even if stderr is not a TTY.
  • --allow-to-run-as-root, -R β€” allow the pool to run as root (disabled by default) πŸ”₯

✨ FILES ✨

  • php-fpm.conf β€” the configuration file for the php-fpm daemon.
  • php.ini β€” the standard php configuration file.

✨ EXAMPLES ✨

okay so depending on how your unix system manages its main process, you've got options:

for any unix systems which use init.d for their main process manager, you should use the init script provided to start and stop the php-fpm daemon:

sudo /etc/init.d/php-fpm start

for any unix systems which use systemd for their main process manager, you should use the unit file provided to start and stop the php-fpm daemon:

sudo systemctl start php-fpm.service

and if your installation has no appropriate init script? just launch php-fpm with no arguments, bestie. it'll launch as a daemon (background process) by default. the file /var/run/php-fpm.pid determines whether php-fpm is already up and running. ⭐

once it's started, php-fpm then responds to several POSIX signals:

SIGINT,SIGTERM      immediate termination
SIGQUIT             graceful stop
SIGUSR1             re-open log file
SIGUSR2             graceful reload of all workers + reload of
fpm conf/binary
ngl, SIGINT/SIGTERM is the "we're done here, immediately" vibe, while SIGQUIT is the polite graceful stop. pick your energy πŸ’…

✨ TIPS ✨

the PHP-FPM CGI daemon will work well with most popular webservers, including Apache2, lighttpd and nginx. it's very "gets along with everyone" of it πŸ¦‹

✨ SEE ALSO ✨

✨ BUGS ✨

you can view the list of known bugs or report any new bug you found at: https://github.com/php/php-src/issues πŸ›

✨ AUTHORS ✨

PHP-FPM SAPI was written by Andrei Nigmatulin. the mailing-lists are highload-php-en (English) and highload-php-ru (Russian). πŸ‘‘

The PHP Group: Thies C. Arntzen, Stig Bakken, Andi Gutmans, Rasmus Lerdorf, Sam Ruby, Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski.

a List of active developers can be found here: http://www.php.net/credits.php

and last but not least, PHP was developed with the help of a huge amount of contributors all around the world. 🌈

✨ VERSION INFORMATION ✨

this manpage describes php-fpm, version 8.3.36.

Copyright Β© The PHP Group Copyright (c) 2007-2009, Andrei Nigmatulin

this source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is available through the world-wide-web at the following url: https://www.php.net/license/3_01.txt

if you did not receive a copy of the PHP license and are unable to obtain it through the world-wide-web, please send a note to license@php.net so we can mail you a copy immediately. πŸ’Œ


and that's the whole page, bestie β€” slayed, no skips, every flag intact πŸŽ€

sign-off: brought to you by The PHP Group, dated 2024, and yes this is still the PHP-FPM(8) page πŸ’œβœ¨

πŸ“¦ where this page comes from
  • alpine 3.24: php83-doc 8.3.36-r0 Β· PHP-3.01 BSD-3-Clause LGPL-2.0-or-later MIT Zend-2.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms