From: Floris Bos <bos@je-eigen-domein.nl>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] lighttpd: install fastcgi config for php
Date: Wed, 03 Dec 2014 00:56:08 +0100 [thread overview]
Message-ID: <547E5198.90208@je-eigen-domein.nl> (raw)
In-Reply-To: <1417559724-25091-1-git-send-email-bluemrp9@gmail.com>
On 12/02/2014 11:35 PM, Ryan Coe wrote:
> Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
> ---
> package/lighttpd/fastcgi.conf | 7 +++++++
> package/lighttpd/lighttpd.mk | 11 +++++++++++
> 2 files changed, 18 insertions(+)
> create mode 100644 package/lighttpd/fastcgi.conf
>
> diff --git a/package/lighttpd/fastcgi.conf b/package/lighttpd/fastcgi.conf
> new file mode 100644
> index 0000000..2ed8bea
> --- /dev/null
> +++ b/package/lighttpd/fastcgi.conf
> @@ -0,0 +1,7 @@
> +server.modules += ( "mod_fastcgi" )
> +
> +fastcgi.server = ( ".php" => ((
> + "bin-path" => "/usr/bin/php-cgi",
> + "socket" => "/tmp/php.socket"
> + )))
> +
> diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk
> index 8f34561..e4a3020 100644
> --- a/package/lighttpd/lighttpd.mk
> +++ b/package/lighttpd/lighttpd.mk
> @@ -78,6 +78,17 @@ endef
>
> LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_CONFIG
>
> +define LIGHTTPD_INSTALL_PHP_CONFIG
> + $(INSTALL) -D -m 0644 package/lighttpd/fastcgi.conf \
> + $(TARGET_DIR)/etc/lighttpd/conf.d/fastcgi.conf
> + $(SED) 's/#include \"conf.d\/fastcgi.conf\"/include \"conf.d\/fastcgi.conf\"/' \
> + $(TARGET_DIR)/etc/lighttpd/modules.conf
> +endef
> +
> +ifeq ($(BR2_PACKAGE_PHP_SAPI_CLI_CGI)$(BR2_PACKAGE_PHP_SAPI_CGI),y)
> + LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_PHP_CONFIG
> +endif
You are making the assumption here that if someone selects the CGI SAPI,
he wants to use the FastCGI interface.
Personally I would prefer plain old regular CGI above FastCGI.
Problem with the FastCGI implementation is that it creates a fixed
number of PHP processes.
Consumes memory even when the webserver isn't executing any PHP script.
And doesn't work too well with PHP scripts that perform blocking
operations or depend on any external server. If all PHP processes are
occupied executing a script, the webserver cannot process any additional
requests until a process becomes available again.
Yours sincerely,
Floris Bos
next prev parent reply other threads:[~2014-12-02 23:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-02 22:35 [Buildroot] [PATCH 1/1] lighttpd: install fastcgi config for php Ryan Coe
2014-12-02 23:56 ` Floris Bos [this message]
2014-12-07 22:50 ` Thomas Petazzoni
2014-12-07 22:56 ` Ryan Coe
2014-12-08 0:19 ` Floris Bos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=547E5198.90208@je-eigen-domein.nl \
--to=bos@je-eigen-domein.nl \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox