summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-01-04 09:57:01 +0000
committerErmal <eri@pfsense.org>2013-01-04 09:57:01 +0000
commit7bd926d5a4074d92bcc35b4df4f8991f0befd9f2 (patch)
tree6bfade6a68bf6a1201ee3e83a25bf60ba3134315
parente321770122121fb920af99ed60eef3ec1056a8f6 (diff)
downloadpfsense-7bd926d5a4074d92bcc35b4df4f8991f0befd9f2.zip
pfsense-7bd926d5a4074d92bcc35b4df4f8991f0befd9f2.tar.gz
Another fix for issues reported on 2.0.2 with php processes dying. Do not use same path for system webGUI and CP webGUI of the php unix socket. This will cause the later started one, usually CP to exit when it attempts to bind/listen on the same path as previous process! Strange this has not been an issue beforegit diff!
-rw-r--r--etc/inc/system.inc12
1 files changed, 9 insertions, 3 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 0486c03..9c178f7 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -759,7 +759,7 @@ function system_generate_lighty_config($filename,
// Ramp up captive portal max procs
// Work relative to the default of 2, for values that would be >2.
- if($captive_portal == true) {
+ if ($captive_portal == true) {
if ($avail <= 135)
$max_procs = 1;
else if ($avail > 135 and $avail < 256) {
@@ -785,13 +785,19 @@ function system_generate_lighty_config($filename,
),
EOC;
- } else
+ } else {
$bin_environment = <<<EOC
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "1",
"PHP_FCGI_MAX_REQUESTS" => "500"
),
EOC;
+ }
+
+ if ($captive_portal !== false)
+ $fast_cgi_path = "{$g['tmp_path']}/php-fastcgi-CP.socket";
+ else
+ $fast_cgi_path = "{$g['tmp_path']}/php-fastcgi.socket";
$fastcgi_config = <<<EOD
#### fastcgi module
@@ -799,7 +805,7 @@ EOC;
fastcgi.server = ( ".php" =>
( "localhost" =>
(
- "socket" => "{$g['tmp_path']}/php-fastcgi.socket",
+ "socket" => "{$fast_cgi_path}",
"max-procs" => {$max_procs},
{$bin_environment}
"bin-path" => "/usr/local/bin/php"
OpenPOWER on IntegriCloud