PHP-FPM(8)
π php-fpm β PHP FastCGI Process Manager π
okay bestie, sit down, hydrate, because we're talking about php-fpm β the PHP FastCGI Process Manager, aka the thing running in the background making your whole web stack look cute. β¨
This is the PHP-FPM(8) page from the Scripting Language manual, and yes I'm gonna tell you literally everything on it. no skips. no cap.
β¨ SYNOPSIS β¨
php-fpm [options]
that's it. that's the whole vibe. you feed it options, it goes off and does daemon things. π
π¦ DESCRIPTION π¦
okay so PHP β you've heard of her β is a widely-used general-purpose scripting language that's especially suited for Web development, and she can get embedded right up into HTML. iconic behavior, we love her for that.
php-fpm is that same PHP, but the variant that runs in the background as a daemon, just vibing there, listening for CGI requests. Output gets logged to /var/log/php-fpm.log.
Most options? They're set in the config file, not on the command line. The config file lives at /etc/php-fpm.conf. By default, php-fpm responds to CGI requests listening on localhost http port 9000. So what that means for you, bestie, is that php-fpm expects your webserver to forward all requests for .php files to port 9000 β so go edit your webserver config file appropriately. yes, actually. do it. π«Ά
π OPTIONS π
here's the whole roster, no crumbs left behind:
-Cβ do not chdir to the script's directory π«--php-inipath|file,-cpath|file β go look for thephp.inifile in the directory path, or just use the specified file directly π--no-php-ini,-nβ absolutely nophp.inifile will be used. none. zero. nada. π--definefoo[=bar],-dfoo[=bar] β define the INI entry foo with the value bar, as a lil treat β¨-eβ generate extended information for debugger/profiler π΅οΈ--help,-hβ the help. the assist. the "what do I even do here" button π--info,-iβ PHP information and configuration, the whole lore dump π--modules,-mβ show compiled in modules π--version,-vβ version number, obviously π--prefixpath,-pβ specify an alternative prefix path (the default is/usr) πΈ--pidfile,-gβ specify where the PID file lives π--fpm-configfile,-yβ specify an alternative path to the FastCGI process manager configuration file (the default is/etc/php-fpm.conf) β--test,-tβ test the FPM configuration file and exit. and 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 tostderrin nodaemonize even ifstderris not a TTY π’--allow-to-run-as-root,-Rβ allow the pool to run as root (disabled by default) π
real talk on that last one: -R is disabled by default for a reason. running as root is giving danger. don't just flip it on for funsies.
π FILES π
php-fpm.confβ the configuration file for thephp-fpmdaemon πphp.iniβ the standard php configuration file π
π₯ SIGNAL π₯
once she's started, php-fpm responds to several POSIX signals. here's the cheat sheet:
SIGINT,SIGTERMβ immediate termination. bye, instantly. πSIGQUITβ graceful stop. the polite exit. πͺSIGUSR1β re-open the log file πSIGUSR2,SIGHUPβ graceful reload of all workers + reload of fpm conf/binary π
π 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
(ngl, if you found a bug, go tell them. they wanna know. iykyk. π)
π«Ά AUTHORS π«Ά
the 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. no seriously, a huge amount. that's the whole world showing up. π
πΈ VERSION INFORMATION πΈ
this manpage describes php-fpm, version 8.2.35. π
π 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, you ate ππ
The PHP Group Β· 2024 Β· PHP-FPM(8) β mwah, talk later, go fix your webserver config π¦β¨
π¦ where this page comes from
- debian bookworm: php8.2-fpm 8.2.35-1~deb12u1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms