From 4683015021e52c3fb3e617e97a1802e7317334b7 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 15 Jan 2013 11:30:20 -0500 Subject: Better test if we're running at the cli or in lighty. Also suppress output for the session start if it fails. --- etc/inc/config.lib.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc index f496562..c2348c8 100644 --- a/etc/inc/config.lib.inc +++ b/etc/inc/config.lib.inc @@ -494,9 +494,9 @@ function write_config($desc="Unknown", $backup = true) { log_error("WARNING! Configuration written on bootup. This can cause stray openvpn and load balancing items in config.xml"); */ - if (!isset($argc)) { + if (!empty($_SERVER['REMOTE_ADDR'])) { if (!session_id()) - session_start(); + @session_start(); $username = empty($_SESSION["Username"]) ? "(system)" : $_SESSION['Username']; session_commit(); } else { -- cgit v1.1