-
MODX Staff
- 10,725 Posts
Sounds like you are missing some files. Did you upload via FTP? If so, might try again and make sure everything gets transferred successfully.
no files are there, tried the same code on an another install and getting the same error...
also notice that in the code below $modx->getOption(’http_host’) return nothing. Maybe part of the same problem.
I replaced by $_SERVER[HTTP_HOST]to have the switch work, then get the error because of $modx->switchContext call.
/* Setup context mapping */
switch ($modx->getOption(’http_host’)) {
case ’modxdomain2.com:80’:
case ’modxdomain2.com’:
// if the http_host is of a specific domain, switch the context
$modx->switchContext(’Domain2’);
break;
default:
// fallback, go to main context
$modx->initialize(’web’);
break;
}
-
MODX Staff
- 10,725 Posts
IDK what the problem is, but it still doesn’t sound like you have a successful installation of MODX by your description. Check Apache’s error_log as well as core/cache/logs/error.log for any hints. You also need to provide the Environment information we ask of all people when posting about bugs they encounter.