1. It's a bug.
2. It's an attempt to integrate the logic for fix_cache_key into core so people don't need to run that separate util if they switch servers.
3. This is what it was doing:
- if the directory named by SESSION_WRITE_DIRECTORY doesn't exist, it was detecting what folder the script was running in so that it could guess what the correct "store root" was, and then appending /cache to it (since if the one in the db didn't exist then the best guess after that is /cache). The bug is that the file doing the detection is 2 levels under the admin folder, and thus was *incorrectly* guessing that it needed to use /admin/includes/ instead of just /
It's easy to avoid encountering the bug:
- create the /cache folder (or any other writable folder)
- set SESSION_WRITE_DIRECTORY to point to it
The fix to have it guess the correct /cache folder is to change the file I mentioned above, and alter the realpath(dirname(__FILE)) to be realpath(dirname($_SERVER['SCRIPT_FILENAME'])) .... but the redirect will still happen if you don't actually have the /cache folder.
But I'm reluctant to commit a code fix for the above, because I'm wondering if the original need for this has maybe expired, and even using fix_cache_key may no longer be necessary, given that sessions are now only stored in the database, not the filesystem.
Further research is required to determine the optimum solution.


Reply With Quote

