PHP-FPM(8)

πŸ“¦ version 8.3.36, in arch rolling

πŸ’… PHP-FPM(8) β€” like, the manual page bestie

okay so this is the manual page for php-fpm β€” aka the PHP FastCGI Process Manager. it lives in the Scripting Language section of your man pages. buckle up πŸŽ€


✨ NAME ✨

php-fpm β€” PHP FastCGI Process Manager, aka 'PHP-FPM' 🫢


🌸 SYNOPSIS 🌸

php-fpm [options]

that's it. that's the whole shape of it. [options] girlies, we'll get to you πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so. PHP is a widely-used general-purpose scripting language (you knew that), and it's especially suited for Web development and can be embedded into HTML. iconic behavior honestly.

this particular variant of PHP is the one that runs in the background as a daemon, just sitting there listening for CGI requests. its output gets logged to /var/log/php-fpm.log. very demure, very mindful. πŸ•―οΈ

most options are set in the configuration file. that file is /etc/php-legacy/php-fpm.conf. by default, php-fpm will respond to CGI requests listening on localhost http port 9000. so, lowkey, php-fpm expects your webserver to forward all requests for '.php' files to port 9000 β€” and bestie, you should edit your webserver configuration file appropriately. not me reminding you twice πŸ’€


⭐ OPTIONS ⭐

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

πŸŽ€ 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? no problem, just launch php-fpm with no arguments. it will launch as a daemon (background process) by default. the file /var/run/php-fpm.pid determines whether php-fpm is already up and running. fr fr, that's the vibe check file.

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

so SIGINT/SIGTERM is the "we're done here" and SIGQUIT is the polite "we're done here" πŸ’€


πŸ’– TIPS πŸ’–

the PHP-FPM CGI daemon will work well with most popular webservers, including Apache2, lighttpd and nginx. it's giving compatibility queen ✨


πŸ” 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

(please do report them, the maintainers are literally begging, i can feel it 🫢)


πŸ‘‘ 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. slay.


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 page bestie πŸŽ€ mwah πŸ’‹ β€” brought to you by The PHP Group, dated 2024, in the PHP-FPM(8) section. go start that daemon. periodt. ⭐

πŸ“¦ where this page comes from