PHP-FPM(8)
π PHP-FPM(8) β the php-fpm girlies' guide
okay so bestie, you're looking at the manual page for php-fpm in section 8, and honestly? it's giving main character energy. let's get into it πΈ
β¨ NAME β¨
php-fpm β the PHP FastCGI Process Manager, aka 'PHP-FPM' π (yes that's its whole government name, quotes and all)
π SYNOPSIS π
php-fpm [options]
that's it. that's the whole vibe. options go in, daemon comes out β¨
π¦ DESCRIPTION π¦
so. PHP is a widely-used general-purpose scripting language that's especially suited for Web development and can be embedded into HTML β you already knew that, you're an icon π
This particular variant of PHP is the one that runs in the background as a daemon, lowkey just sitting there listening for CGI requests. and where does its output go, you ask? it's logged to /var/log/php-fpm.log π
most options are set in the configuration file β which is /etc/php/php-fpm.conf, no cap. by default, php-fpm responds to CGI requests listening on localhost http port 9000. so what that means for you is: php-fpm expects your webserver to forward all requests for '.php' files to port 9000, and you should edit your webserver configuration file appropriately. yes, you. go do it. π«Ά
π OPTIONS π
-Cβ do not chdir to the script's directory. stay put, queen.--php-ini path|file,-c path|fileβ look for thephp.inifile in the directory path, or just use the specified file.--no-php-ini,-nβ nophp.inifile will be used. none. zero. ghosted. π--define foo[=bar],-d foo[=bar]β define INI entry foo with value bar. cute little inline override β¨-eβ generate extended information for debugger/profiler. detective mode π--help,-hβ this help. hi bestie π--info,-iβ PHP information and configuration. the full tea β--modules,-mβ show compiled in modules. look at all her little friends π§--version,-vβ version number. who is she π--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 the FastCGI process manager configuration file (the default is/etc/php/php-fpm.conf).--test,-tβ test the FPM configuration file and exit. and listen β if you call it twice (-tt), the configuration is dumped before exiting. double tap for the receipts π--daemonize,-Dβ force it to run in background and ignore thedaemonizeoption from the configuration file. she said "config, who?"--nodaemonize,-Fβ force it to stay in foreground and ignore thedaemonizeoption from the configuration file.--force-stderr,-Oβ force output to stderr in nodaemonize even if stderr is not a TTY. ngl kind of a niche one but ok π₯--allow-to-run-as-root,-Rβ allow pool to run as root (disabled by default). β οΈ yeah she's off by default for a reason, be careful with this one fr fr.
πΈ FILES πΈ
php-fpm.confβ the configuration file for thephp-fpmdaemon. her whole personality lives here.php.iniβ the standard php configuration file.
π EXAMPLES π
okay so depending on what your unix system uses to manage processes, 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? no worries bestie. just launch php-fpm with no arguments. it'll launch as a daemon (background process) by default β icon behaviour. 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:
SIGINT,SIGTERM immediate termination
SIGQUIT graceful stop
SIGUSR1 re-open log file
SIGUSR2 graceful reload of all workers + reload of
fpm conf/binary
β TIPS β
the PHP-FPM CGI daemon will work well with most popular webservers, including Apache2, lighttpd and nginx. she's friendly like that π«Ά
π 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
(be nice in the issue tracker pls π)
π§ 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: 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. literally the whole group chat showed up ππ
π₯ VERSION INFORMATION π₯
this manpage describes php-fpm, version 8.5.12.
π 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.
okay that's the whole page bestie, you ate that π β¨
ππ brought to you by The PHP Group, dated 2024, living in PHP-FPM(8) β slay, periodt. π
π¦ where this page comes from
- arch rolling: php-fpm 8.5.12-3 Β· PHP-3.01
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms