PHP-FPM(8)

πŸ“¦ version 8.4.27, in alpine 3.24

πŸ’… PHP-FPM(8) β€” the php-fpm girlies' manual

okay so bestie, you're reading the php-fpm manpage, from the PHP-FPM(8) manual set, in the Scripting Language section β€” and honestly? you came to the right place. let's get into it 🫢


✨ NAME ✨

php-fpm β€” the PHP FastCGI Process Manager, aka 'PHP-FPM'. that's her full government name πŸ’…


🌸 SYNOPSIS 🌸

php-fpm [options]

like, that's it. options only. she's low maintenance like that.


πŸ¦‹ DESCRIPTION πŸ¦‹

so PHP is this widely-used general-purpose scripting language, right? and it's especially suited for Web development and can be embedded into HTML. that's the whole vibe.

this version of PHP is the one that runs in the background as a daemon, listening for CGI requests. and where does her output go? /var/log/php-fpm.log. periodt, that's the log file.

most options are set in the configuration file β€” which lives at /etc/php84/php-fpm.conf. by default, php-fpm responds to CGI requests listening on localhost http port 9000. so she's literally expecting your webserver to forward all requests for '.php' files to port 9000, and you should go edit your webserver configuration file appropriately. no cap, that part matters. πŸ”₯


πŸ’… 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 use the specified file
  • --no-php-ini, -n β€” no php.ini file will be used, none, zero, nada πŸ™ˆ
  • --define foo[=bar], -d foo[=bar] β€” define 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 alternative prefix path (the default is /usr)
  • --pid file, -g β€” specify the PID file location
  • --fpm-config file, -y β€” specify alternative path to FastCGI process manager configuration file (the default is /etc/php84/php-fpm.conf)
  • --test, -t β€” test FPM configuration file and exit. and ooh, if called twice (-tt), the configuration is dumped before exiting πŸ‘€
  • --daemonize, -D β€” force to run in background and ignore the daemonize option from the configuration file
  • --nodaemonize, -F β€” force to stay in 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 pool to run as root (disabled by default β€” and honestly bestie, keep it that way πŸ’€)

πŸŽ€ FILES πŸŽ€

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

⭐ EXAMPLES ⭐

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. she'll launch as a daemon (background process) by default, main character energy fr fr. the file /var/run/php-fpm.pid determines whether php-fpm is already up and running.

once started, php-fpm then responds to several POSIX signals β€” like, this is the whole signals moment, pay attention:

SIGINT,SIGTERM      immediate termination
SIGQUIT             graceful stop
SIGUSR1             re-open log file
SIGUSR2             graceful reload of all workers + reload of
fpm conf/binary
the SIGINT,SIGTERM one is immediate termination β€” no gentle goodbyes, she's just gone. SIGQUIT is your graceful stop bestie. πŸ’€

🌈 TIPS 🌈

the PHP-FPM CGI daemon will work well with most popular webservers, including Apache2, lighttpd and nginx. she's versatile, she's friendly, she gets along with everyone 🧚


πŸ’œ SEE ALSO πŸ’œ

for a more or less complete description of PHP-FPM look here: https://www.php.net/fpm


πŸ“ BUGS πŸ“

you can view the list of known bugs or report any new bug you found at: https://github.com/php/php-src/issues β€” go snitch, king πŸ‘‘


πŸ‘‘ 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. icons, every single one. 🌟

a List of active developers can be found here: https://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. the community ate, honestly. 🫢


πŸ”₯ VERSION INFORMATION πŸ”₯

this manpage describes php-fpm, version 8.4.27. yes, that specific. don't @ me.


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 like, legally, please actually do that πŸŽ€


thx for reading bestie, mwah πŸ’‹ β€” this has been the PHP-FPM(8) page from The PHP Group, dated 2024, and yeah, that's the whole footer. slay. ✨

πŸ“¦ where this page comes from
  • alpine 3.24: php84-doc 8.4.27-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