PHP-FPM(8)
π 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-inipath|file,-cpath|file β look for thephp.inifile in the directory path, or just use the specified file--no-php-ini,-nβ nophp.inifile will be used at all, we're going feral π--definefoo[=bar],-dfoo[=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--prefixpath,-pβ specify an alternative prefix path (the default is/usr)--pidfile,-gβ specify the PID file location.--fpm-configfile,-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 thedaemonizeoption from the configuration file.--nodaemonize,-Fβ force it to stay in the foreground and ignore thedaemonizeoption 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 thephp-fpmdaemon.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/SIGTERMis the "we're done here, immediately" vibe, whileSIGQUITis 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 β¨
- the PHP-FPM website:
http://php-fpm.org - for a more or less complete description of PHP look here:
http://www.php.net/manual/ - a nice introduction to PHP by Stig Bakken can be found here:
http://www.zend.com/zend/art/intro.php
β¨ 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 β¨
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