hussain
(Hussaintamboli18)
November 7, 2012, 9:53am
1
My ‘config’ variable from index.php is -
$config=dirname(FILE ).’/../protected/config/main.php’;
it works fine.
But I when I add a folder say dev into config/ and copy main.php into it and change ‘config’ to -
$config=dirname(FILE ).’/../protected/config/development/main.php’;
it gives me an error -
exception ‘CHttpException’ with message 'Unable to resolve the request
“reports/method”.’ in
/home/foo/workspace/framework/web/CWebApplication.php:287
The permissions of config/, main.php, development/ are same.
Keith
(Kburton)
November 7, 2012, 9:58am
2
You need to change the applications base path in the config file, probably to:
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..',
hussain
(Hussaintamboli18)
November 7, 2012, 10:46am
3
Thanks Keith, it works.
But I am confused between runtimePath and basePath variable though. Especially the parent directory of runtimePath variable.
Keith
(Kburton)
November 7, 2012, 10:50am
4
You shouldn’t need to worry about runtimePath, it’s just where Yii stores its logs and cache data. Once basePath is set, you shouldn’t need to use it either; you would get paths using Yii::getPathOfAlias(‘path.here’).