From 440a150aa383e49a3b97b9cbbb67ec710c48dd72 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Oct 2009 23:44:55 +0000 Subject: [PATCH] Fix for Plesk --- htdocs/cashdesk/index.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index 04e10c0c7d8..20c3d28738d 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -23,6 +23,9 @@ * \version $Id$ */ +// This is to make Dolibarr working with Plesk +set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); + // Init session. Name of session is specific to Dolibarr instance. $sessionname='DOLSESSID_'.md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"]); $sessiontimeout='DOLSESSTIMEOUT_'.md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"]); @@ -30,7 +33,10 @@ if (! empty($_COOKIE[$sessiontimeout])) ini_set('session.gc_maxlifetime',$_COOKI session_name($sessionname); session_start(); -include('../master.inc.php'); +// Set and init common variables +// This include will set: config file variable $dolibarr_xxx, $conf, $langs and $mysoc objects +require_once("../master.inc.php"); + if ( $_SESSION['uid'] > 0 ) { @@ -38,6 +44,7 @@ if ( $_SESSION['uid'] > 0 ) exit; } + ?>