**Reproduction steps:**
- Install as per the instructions, but omit APC. APC may be inconvenient when on the server we already got (and must use) memcached, xcache and other stuff that could lead to conflicts.
- Go to the home page URL, the setup should begin. It should print a "Install APC" end user message, the code and the message is there in the code.
**Expected result:**
- The PhabricatorCaches class should fall back to disk cache, therefore setup should go on. The setup "please install APC" message actually gets loaded in the appropriate variables and would be ready to be output to the end user. I mean: everything is setup like the end user would appropriately get a graceful exit, along with a friendly: "Please install APC" suggestion. Relevant cache build class snippet is shown below:
```
/**
* @task setup
*/
private static function buildSetupCaches() {
// If this is the CLI, just build a setup cache.
if (php_sapi_name() == 'cli') {
return array();
}
// In most cases, we should have APC. This is an ideal cache for our
// purposes -- it's fast and empties on server restart.
$apc = new PhutilAPCKeyValueCache();
if ($apc->isAvailable()) {
return array($apc);
}
// If we don't have APC, build a poor approximation on disk. This is still
// much better than nothing; some setup steps are quite slow.
$disk_path = self::getSetupCacheDiskCachePath();
if ($disk_path) {
$disk = new PhutilOnDiskKeyValueCache();
$disk->setCacheFile($disk_path);
$disk->setWait(0.1);
if ($disk->isAvailable()) {
return array($disk);
}
}
return array();
}
```
**Actual result:**
`getSetupCache()`, `buildSetupCaches()`'s caller, calls:
```
$cache = self::newStackFromCaches($caches);
```
which in turn calls `self::addNamespaceToCaches($caches);`
which in turns executes:
```
public static function getNamespace() {
return PhabricatorEnv::getEnvConfig('phabricator.cache-namespace');
}
```
which ends up invoking this code:
```
if (!self::$sourceStack) {
throw new Exception(
pht(
'Trying to read configuration "%s" before configuration has been '.
'initialized.',
$key));
}
```
And in fact, the end user gets the following exception:
`Trying to read configuration "phabricator.cache-namespace" before configuration has been initialized.`
**Versions**
Phabricator version: commit c0bf08058b77a43a968ea59b8f9c8559d273e758 (git clone has been performed today).
The issue prevents invoking the suggested "config" user friendly interface, this is what git show indicates.
arcanist 9e82ef979e8148c43b9b8439025d505b1219e213 (25 Aug 2016)
libphutil 0107c187b6d8a4c1725972ab80a6cdc97d9912d3 (9 Sep 2016)