…nked elsewhere, preserving user sessions and auto-login. This is a problem when using Capistrano to deploy Yii projects since the current/ => releases/* symlinks change with every deployment.
Prior to this commit, the config param 'basePath' would pass through realpath() and symlinks are resolved, then this path would be used in CApplication::getId() to generate a unique ID for the application. When a user visits your Yii app, CWebUser::getStateKeyPrefix() is used to generate a session key prefix - this function uses the aforementioned getId() function, which is filesystem location-dependent. If you change the absolute path of your 'protected/' folder (aka basePath) by syminking or otherwise, getId() is changed, so getStateKeyPrefix() is changed, so your session variables cannot be restored. This means that 1) all your users are logged out; and 2) the auto-login feature will not work since the key prefix is different.
This commit changes the CApplication::getId() method to use php_uname() instead of the getBasePath() to keep similar uniqueness, while removing the need for the filesystem location to remain the same.