From 7bd926d5a4074d92bcc35b4df4f8991f0befd9f2 Mon Sep 17 00:00:00 2001 From: Ermal Date: Fri, 4 Jan 2013 09:57:01 +0000 Subject: 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! --- etc/inc/system.inc | 12 +++++++++--- 1 file 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 = << ( "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 = << ( "localhost" => ( - "socket" => "{$g['tmp_path']}/php-fastcgi.socket", + "socket" => "{$fast_cgi_path}", "max-procs" => {$max_procs}, {$bin_environment} "bin-path" => "/usr/local/bin/php" -- cgit v1.1