From 562ab4dc1412654db5f3fa4b54fca2ee31339f3a Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Tue, 20 Oct 2009 19:25:20 +0000 Subject: [PATCH] setup.php: - define('POSTFIXADMIN') to avoid session_start() call in common.php This avoids breakage if php5-session is not installed. Fixes https://sourceforge.net/tracker/?func=detail&aid=2855430&group_id=191583&atid=937964 common.php - only define('POSTFIXADMIN') if it is not yet defined (avoids a warning) git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@733 a1433add-5e2c-0410-b055-b7f2511e0802 --- common.php | 4 ++-- setup.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common.php b/common.php index c8938d75..32c98e38 100644 --- a/common.php +++ b/common.php @@ -17,10 +17,10 @@ * environment and ensures other functions are loaded. */ -if(!defined('POSTFIXADMIN')) { +if(!defined('POSTFIXADMIN')) { # already defined if called from setup.php session_start(); + define('POSTFIXADMIN', 1); # checked in included files } -define('POSTFIXADMIN', 1); # checked in included files $incpath = dirname(__FILE__); (ini_get('magic_quotes_gpc') ? ini_set('magic_quotes_runtime', '0') : '1'); diff --git a/setup.php b/setup.php index a62d8e2d..94144b55 100644 --- a/setup.php +++ b/setup.php @@ -23,6 +23,8 @@ * Form POST \ GET Variables: -none- */ +define('POSTFIXADMIN', 1); # by defining it here, common.php will not start a session. + require_once('common.php'); $CONF['show_header_text'] = 'NO';