Fix: Can have one system dir for two virtual servers or two instances in same system dir.
This commit is contained in:
parent
c8013ac699
commit
ee784452f0
@ -66,13 +66,13 @@ function GETPOST($paramname,$check='',$method=0)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a prefix to use for this Dolibarr instance for session or cookie names.
|
* Return a prefix to use for this Dolibarr instance for session or cookie names.
|
||||||
* This prefix is unique for instance and avoid conflict between multi-instances Dolibarrs.
|
* This prefix is unique for instance and avoid conflict between multi-instances Dolibarrs,
|
||||||
|
* even when having two instances with one root dir or two instances in virtual servers.
|
||||||
* @return string A calculated prefix
|
* @return string A calculated prefix
|
||||||
*/
|
*/
|
||||||
function dol_getprefix()
|
function dol_getprefix()
|
||||||
{
|
{
|
||||||
//print "prefix=".$_SERVER["SERVER_NAME"]."-".$_SERVER["DOCUMENT_ROOT"]."-".DOL_DOCUMENT_ROOT;
|
return md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT);
|
||||||
return md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user