Skip to content

Commit

Permalink
Unix Man page. A few other minor improvements in autoconf macros
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamcat4 committed Aug 24, 2009
1 parent 52388b1 commit 1406b39
Show file tree
Hide file tree
Showing 6 changed files with 206 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.bzr
autom4te.cache
autotools
man1
4 changes: 2 additions & 2 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ AC_DEFUN([AC_FPM_PHP],
AC_SUBST(PHP_OBJS)
AC_SUBST(PHP_SRCDIR)
AC_SUBST(PHP_BUILDDIR)
AC_SUBST(PHP_VERSION)
])

AC_DEFUN([AC_FPM_LIBEVENT_EMBEDDED],
Expand Down Expand Up @@ -492,7 +493,7 @@ AC_DEFUN([AC_FPM_PATHS],
else
php_fpm_bin_path="$with_fpm_bin"
fi
PHP_FPM_BIN=`basename $php_fpm_bin_path`
php_fpm_bin=`basename $php_fpm_bin_path`
if test -z "$with_fpm_conf" -o "$with_fpm_conf" = "yes" -o "$with_fpm_conf" = "no"; then
php_fpm_conf_path="$fpm_prefix/etc/php-fpm.conf"
Expand Down Expand Up @@ -525,7 +526,6 @@ AC_DEFUN([AC_FPM_PATHS],
php_fpm_group="$with_fpm_group"
fi
AC_SUBST(PHP_FPM_BIN)
])

AC_DEFUN([AC_FPM_CC],
Expand Down
13 changes: 12 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ AC_SUBST(php_fpm_ADD_LIBS)

AC_DEFINE_UNQUOTED(PHP_FPM_VERSION, "$PACKAGE_VERSION", [fpm version])

AC_SUBST(PHP_VERSION)
AC_DEFINE_UNQUOTED(PHP_VERSION, "$PHP_VERSION", [php version])

AC_SUBST(php_fpm_bin)
AC_DEFINE_UNQUOTED(PHP_FPM_BIN, "$php_fpm_bin", [fpm binary executable])

AC_SUBST(php_fpm_bin_path)
AC_DEFINE_UNQUOTED(PHP_FPM_BIN_PATH, "$php_fpm_bin_path", [fpm bin file path])

Expand All @@ -59,5 +65,10 @@ AC_DEFINE_UNQUOTED(PHP_FPM_GROUP, "$php_fpm_group", [fpm group name])

AC_CONFIG_FILES([Makefile src/Makefile src/sapi/Makefile src/fpm/Makefile])

AC_OUTPUT(src/$php_fpm_conf:conf/php-fpm.conf.in src/init.d.$PHP_FPM_BIN:init.d/php-fpm.in)

AC_OUTPUT(src/$php_fpm_conf:conf/php-fpm.conf.in)

AC_OUTPUT(src/init.d.$php_fpm_bin:init.d/php-fpm.in)

AC_OUTPUT(src/$php_fpm_bin.1:man/php-fpm.1.in)

2 changes: 1 addition & 1 deletion init.d/php-fpm.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ case "$1" in
start)
echo -n "Starting php_fpm "

$php_fpm_BIN --fpm $php_opts
$php_fpm_BIN $php_opts

if [ "$?" != 0 ] ; then
echo " failed"
Expand Down
186 changes: 186 additions & 0 deletions man/php-fpm.1.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
.TH PHP-FPM 1 "2009" "The PHP Group" "Scripting Language"
.SH NAME
.TP 15
@php_fpm_bin@ \- PHP FastCGI Process Manager 'PHP-FPM'
.SH SYNOPSIS
.B @php_fpm_bin@
[options]
.LP
.SH DESCRIPTION
\fBPHP\fP is a widely\-used general\-purpose scripting language that is especially suited for
Web development and can be embedded into HTML. This is a variant of PHP that will run in the background as a daemon, listening for CGI requests. Output is logged to @php_fpm_log_path@.
.LP
Most options are set in the configuration file. The configuration file is @php_fpm_conf_path@. By default, @php_fpm_bin@ will respond to CGI requests listening on localhost http port 9000. Therefore @php_fpm_bin@ expects your webserver to forward all requests for '.php' files to port 9000 and you should edit your webserver configuration file appropriately.
.SH OPTIONS
.TP 15
.B \-C
Do not chdir to the script's directory
.TP
.PD 0
.B \-\-php\-ini \fIpath\fP|\fIfile\fP
.TP
.PD 1
.B \-c \fIpath\fP|\fIfile\fP
Look for
.B php.ini
file in the directory
.IR path
or use the specified
.IR file
.TP
.PD 0
.B \-\-no\-php\-ini
.TP
.PD 1
.B \-n
No
.B php.ini
file will be used
.TP
.PD 0
.B \-\-define \fIfoo\fP[=\fIbar\fP]
.TP
.PD 1
.B \-d \fIfoo\fP[=\fIbar\fP]
Define INI entry
.IR foo
with value
.IR bar
.TP
.B \-e
Generate extended information for debugger/profiler
.TP
.PD 0
.B \-\-help
.TP
.PD 1
.B \-h
This help
.TP
.PD 0
.B \-\-info
.TP
.PD 1
.B \-i
PHP information and configuration
.TP
.PD 0
.B \-\-modules
.TP
.PD 1
.B \-m
Show compiled in modules
.TP
.PD 0
.B \-\-version
.TP
.PD 1
.B \-v
Version number
.TP
.PD 0
.B \-\-fpm\-config \fIfile\fP
.TP
.PD 1
.B \-\-y
Specify alternative path to FastCGI process manager configuration file (the default is @php_fpm_conf_path@)
.TP
.PD 0
.B \-\-zend\-extension \fIfile\fP
.TP
.PD 1
.B \-z \fIfile\fP
Load Zend extension
.IR file
.SH FILES
.TP 15
.B @[email protected]
The configuration file for the @php_fpm_bin@ daemon.
.TP
.B php.ini
The standard php configuration file.
.SH EXAMPLES
You should use the init script provided to start and stop the @php_fpm_bin@ daemon. This situation applies for any unix systems which use init.d for their main process manager.
.P
.PD 1
.RS
sudo /etc/init.d/@php_fpm_bin@ start
.RE
.TP
If your installation has no appropriate init script, launch @php_fpm_bin_path@ with no arguments. It will launch as a daemon (background process) by default. The file @php_fpm_pid_path@ determines whether @php_fpm_bin@ is already up and running. Once started, @php_fpm_bin@ then responds to several POSIX signals:
.P
.PD 0
.RS
.B SIGINT,SIGTERM \fPimmediate termination
.TP
.B SIGQUIT \fPgraceful stop
.TP
.B SIGUSR1 \fPre-open log file
.TP
.B SIGUSR2 \fPgraceful reload of all workers + reload of fpm conf/binary
.RE
.PD 1
.P
.SH TIPS
The PHP-FPM CGI daemon will work well with most popular webservers, including Apache2 and light-httpd. For best efficiency and performance improvements its also worthwhile to consider the engine-x webserver ('nginx'), and php opcode-cacher ('php5-xcache').
.PD 1
.P
.SH SEE ALSO
The PHP-FPM website:
.PD 0
.P
.B http://php-fpm.org
.PD 1
.P
For a more or less complete description of PHP look here:
.PD 0
.P
.B http://www.php.net/manual/
.PD 1
.P
A nice introduction to PHP by Stig Bakken can be found here:
.PD 0
.P
.B http://www.zend.com/zend/art/intro.php
.PD 1
.SH BUGS
You can view the list of known bugs or report any new bug you
found at:
.PD 0
.P
.B http://bugs.php.net
.PD 1
.SH AUTHORS
PHP-FPM Sapi was written by Andrei Nigmatulin. The mailing-lists are highload-php-en (English) and highload-php-ru (Russion).
.P
The PHP Group: Thies C. Arntzen, Stig Bakken, Andi Gutmans, Rasmus Lerdorf, Sam Ruby, Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski.
.P
A List of active developers can be found here:
.PD 0
.P
.B http://www.php.net/credits.php
.PD 1
.P
And last but not least PHP was developed with the help of a huge amount of
contributors all around the world.
.SH VERSION INFORMATION
This manpage describes \fBphp\fP, version @PHP_VERSION@, \fBfpm\fP, version @PACKAGE_VERSION@.
.SH COPYRIGHT
Copyright \(co 1997\-2009 The PHP Group
.PD 0
.P
Copyright (c) 2007-2009, Andrei Nigmatulin
.PD 1
.LP
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:
.PD 0
.P
.B http://www.php.net/license/3_01.txt
.PD 1
.P
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
.B [email protected]
so we can mail you a copy immediately.
8 changes: 4 additions & 4 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

SUBDIRS = sapi fpm

bin_PROGRAMS = $(PHP_FPM_BIN)
AM_CFLAGS +=-export-dynamic
bin_PROGRAMS = $(php_fpm_bin)

$(PHP_FPM_BIN): php_fpm
ln -sf php_fpm $(PHP_FPM_BIN)
$(php_fpm_bin): php_fpm
ln -sf php_fpm $(php_fpm_bin)

EXTRA_PROGRAMS = php_fpm
php_fpm_SOURCES =
php_fpm_LDFLAGS =-export-dynamic

php_fpm_LDADD = \
$(PHP_OBJS:%=$(PHP_BUILDDIR)/%) \
Expand Down

0 comments on commit 1406b39

Please sign in to comment.