Skip to content
Snippets Groups Projects
Commit ee784452 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Can have one system dir for two virtual servers or two instances in same system dir.

parent c8013ac6
No related branches found
No related tags found
No related merge requests found
......@@ -66,13 +66,13 @@ function GETPOST($paramname,$check='',$method=0)
/**
* 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
*/
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);
return md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment