summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-01-04 10:00:37 +0000
committerErmal <eri@pfsense.org>2013-01-04 10:00:37 +0000
commit70e454e168348dab4a99509c16c059b1d769291f (patch)
treeb9413e169f3f0de66633ec8c8b7d4d453bf08a36 /etc
parenta96f2d3da9905f7905dceff10626b25e14a73b37 (diff)
downloadpfsense-70e454e168348dab4a99509c16c059b1d769291f.zip
pfsense-70e454e168348dab4a99509c16c059b1d769291f.tar.gz
Slight code re-organization
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/system.inc23
1 files changed, 7 insertions, 16 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 48496b9..00b7f68 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -861,7 +861,7 @@ function system_generate_lighty_config($filename,
$max_procs = ($config['system']['webgui']['max_procs']) ? $config['system']['webgui']['max_procs'] : 2;
// Ramp up captive portal max procs, assuming each PHP process can consume up to 64MB RAM
- if($captive_portal !== false) {
+ if ($captive_portal !== false) {
if ($avail > 135 and $avail < 256) {
$max_procs += 1; // 2 worker processes
} else if ($avail > 255 and $avail < 513) {
@@ -874,20 +874,8 @@ function system_generate_lighty_config($filename,
else
$max_php_children = 1;
- $bin_environment = <<<EOC
- "bin-environment" => (
- "PHP_FCGI_CHILDREN" => "{$max_php_children}",
- "PHP_FCGI_MAX_REQUESTS" => "500"
- ),
-EOC;
- } else {
- $bin_environment = <<<EOC
- "bin-environment" => (
- "PHP_FCGI_CHILDREN" => "1",
- "PHP_FCGI_MAX_REQUESTS" => "500"
- ),
-EOC;
- }
+ } else
+ $max_php_children = 1;
if ($captive_portal !== false)
$fast_cgi_path = "{$g['tmp_path']}/php-fastcgi-{$captive_portal}.socket";
@@ -902,7 +890,10 @@ fastcgi.server = ( ".php" =>
(
"socket" => "{$fast_cgi_path}",
"max-procs" => {$max_procs},
- {$bin_environment}
+ "bin-environment" => (
+ "PHP_FCGI_CHILDREN" => "{$max_php_children}",
+ "PHP_FCGI_MAX_REQUESTS" => "500"
+ ),
"bin-path" => "/usr/local/bin/php"
)
)
OpenPOWER on IntegriCloud