OS Manuals

/usr/bin/php-cgi

PHP 8.2 CGI

From php-8.2-cgi 8.2.35-r1 (os), captured 2026-11-05 by running php-cgi --help (exit 0). permalink

Also provided by 3 other package versions
Usage: php-cgi [-q] [-h] [-s] [-v] [-i] [-f <file>]
       php-cgi <file> [args...]
  -a               Run interactively
  -b <address:port>|<port> Bind Path for external FASTCGI Server mode
  -C               Do not chdir to the script's directory
  -c <path>|<file> Look for php.ini file in this directory
  -n               No php.ini file will be used
  -d foo[=bar]     Define INI entry foo with value 'bar'
  -e               Generate extended information for debugger/profiler
  -f <file>        Parse <file>.  Implies `-q'
  -h               This help
  -i               PHP information
  -l               Syntax check only (lint)
  -m               Show compiled in modules
  -q               Quiet-mode.  Suppress HTTP Header output.
  -s               Display colour syntax highlighted source.
  -v               Version number
  -w               Display source with stripped comments and whitespace.
  -z <file>        Load Zend extension <file>.
  -T <count>       Measure execution time of script repeated <count> times.
Options (62)
OptionDescriptionSource
-aRun PHP interactively.help + man
-CDo not chdir to the script's directory (CGI only).help + man
-nNo php.ini file will be usedhelp + man
-d foo[=barDefine INI entry foo with value 'bar'help + man
-eGenerate extended information for debugger/profilerhelp + man
-f fileParse and execute filehelp + man
-hThis helphelp + man
-iPHP information and configurationhelp + man
-lSyntax check only (lint)help + man
-mShow compiled in moduleshelp + man
-qQuiet-mode.help + man
-sDisplay colour syntax highlighted source.help + man
-vVersion numberhelp + man
-wDisplay source with stripped comments and whitespace.help + man
-z fileLoad Zend extension <file>.help + man
-T countMeasure execution time of script repeated count times (CGI only).help + man
--interactive (in the manual page but not in --help)man
--bindpath address:port|port (in the manual page but not in --help)man
-b address:port|portBind Path for external FASTCGI Server mode (CGI only). (in the manual page but not in --help)man
--no-chdir (in the manual page but not in --help)man
--no-header (in the manual page but not in --help)man
--timing count (in the manual page but not in --help)man
--php-ini path|file (in the manual page but not in --help)man
-c path|fileLook for php.ini file in the directory path or use the specified file (in the manual page but not in --help)man
--no-php-ini (in the manual page but not in --help)man
--define foo[=bar (in the manual page but not in --help)man
--file file (in the manual page but not in --help)man
--help (in the manual page but not in --help)man
--hide-args (in the manual page but not in --help)man
-HHide script name (file) and parameters (args...) from external tools. (in the manual page but not in --help)man
--info (in the manual page but not in --help)man
--syntax-check (in the manual page but not in --help)man
--modules (in the manual page but not in --help)man
--run code (in the manual page but not in --help)man
-r codeRun PHP code without using script tags '<?..?>' (in the manual page but not in --help)man
--process-begin code (in the manual page but not in --help)man
-B begin_codeRun PHP begin_code before processing input lines (in the manual page but not in --help)man
--process-code code (in the manual page but not in --help)man
-R codeRun PHP code for every input line (in the manual page but not in --help)man
--process-file file (in the manual page but not in --help)man
-F fileParse and execute file for every input line (in the manual page but not in --help)man
--process-end code (in the manual page but not in --help)man
-E end_codeRun PHP end_code after processing all input lines (in the manual page but not in --help)man
--syntax-highlight (in the manual page but not in --help)man
--server addr:port (in the manual page but not in --help)man
-S addr:portStart built-in web server on the given local address and port (in the manual page but not in --help)man
--docroot docroot (in the manual page but not in --help)man
-t docrootSpecify the document root to be used by the built-in web server (in the manual page but not in --help)man
--version (in the manual page but not in --help)man
--strip (in the manual page but not in --help)man
--zend-extension file (in the manual page but not in --help)man
--rfunctionname (in the manual page but not in --help)man
--rfname Shows information about function name (in the manual page but not in --help)man
--rclassname (in the manual page but not in --help)man
--rcname Shows information about class name (in the manual page but not in --help)man
--rextensionname (in the manual page but not in --help)man
--rename Shows information about extension name (in the manual page but not in --help)man
--rzendextensionname (in the manual page but not in --help)man
--rzname Shows information about Zend extension name (in the manual page but not in --help)man
--rextinfoname (in the manual page but not in --help)man
--riname Shows configuration for extension name (in the manual page but not in --help)man
--iniShow configuration file names (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.