Problem/Motivation
The Domain Access settings.inc file included by the site settings.php file fails if includes/cache.inc is already loaded. Therefore, the Domain Access modifications to settings.php must come before the modifications required by a caching module such as Memcache or APC.
Proposed resolution
The Domain Access documentation should mention this requirement.
Original report by ben soo
Hi, thot i should try starting up a new issue for this problem. The error i get is:
Domain access failed to load during phase: 2. Please check your settings.php file and site configuration.
What the domain module startup code says abt this phase:
/**
* Domain bootstrap phase 2: resolves host and does a lookup in the {domain}
* table. Also invokes hook "hook_domain_bootstrap_lookup".
*/
abt the only other info i can provide would be the query log the Devel module outputs for each page load. Would you want that?
Comments
Comment #1
ben soo commentedok, i found something. Domain Access requires inclusion of a setup file as the last line in settings.php, after the memcache include files have been loaded. At the bottom of the Domain Access settings.inc setup file is this test:
obviously the Memcache setup lines has caused cache_get() to be already defined by this point and so the function returns false to the Domain Access bootup code, and the bootstrap fails.
i've neutralized this test and just let Domain Access bootstrap, and run it a bit on a test site hosting 2 domains thru Domain Access, and it and Memcache so far co-exist fine.
Comment #2
pillarsdotnet commentedIn order for Domain Access and Memcache API and Integration to co-exist, the order of statements in the site
settings.phpfile must be as follows:If the order is reversed, (Memcache before Domain Access), then Domain Access breaks but Memcache still works. Since Domain Access is the module with a specific requirement, Domain Access should document that requirement.
Comment #3
agentrickard@ben soo.
This is a duplicate of a fixed issue that you cross-posted.
#1240472: Domain Access doesn't bootstrap when Memcache API installed
Comment #4
ben soo commentedLoading Domain Access before Memcache API didn't work for me-- generated a pile of database errors.
In any case, agentrickard has solved it.
@agentrickard
--yeps, sorry abt the duplication in the Memcache API issue queue; i did note it in the issue i started in the Domain Access issue queue, but had neglected to come back here to link to your solution.
EDIT: i dunno why this now shows up here since i posted it in Memcache.
Comment #4.0
ben soo commentedCorrected issue summary.