I have attempted to install the yii-auth module (as per the instructions) but as soon as I do, I get the following error on my index page:
CException
Description
Property "CWebApplication.authManager" is read only.
Source File
/var/www/yii/framework/base/CModule.php(441)
I have made sure that the authentication folder and its contents (as well as the CDbAuthManager.php file) are writeable. How else do I resolve this?
Many thanks!
Page 1 of 1
Yii-Auth Property "CWebApplication.authManager" is read only.
#2
Posted 05 May 2010 - 01:18 AM
C Boyd, on 04 May 2010 - 05:23 PM, said:
I have attempted to install the yii-auth module (as per the instructions) but as soon as I do, I get the following error on my index page:
CException
Description
Property "CWebApplication.authManager" is read only.
Source File
/var/www/yii/framework/base/CModule.php(441)
I have made sure that the authentication folder and its contents (as well as the CDbAuthManager.php file) are writeable. How else do I resolve this?
Many thanks!
CException
Description
Property "CWebApplication.authManager" is read only.
Source File
/var/www/yii/framework/base/CModule.php(441)
I have made sure that the authentication folder and its contents (as well as the CDbAuthManager.php file) are writeable. How else do I resolve this?
Many thanks!
Could you please post your stack trace as well.
You get the "is read only error" when you have a private property and no getter (e.g. getAuthManager). As far as I know it has nothing to do with if the file is read only or not. Changed the call to Yii::app()->getAuthManager() to avoid using the CComponent's "magic" get function. Hopefully this resolves the issue.
Also, please make sure that your application configuration is set up as in the installation instructions.
Which version of the framework are you running btw?
Please let me know if this worked for you. Also, please let me know how you like the module. Thank you in advance.
#3
Posted 05 May 2010 - 01:05 PM
It seems you are trying to configure authManager inside the application configuration instead of in it's sub-config 'components'.
make sure your authManager config is specified in the components array
make sure your authManager config is specified in the components array
php:
foreach(array('cat', 'dog', 'cow') as $animal) echo $animal."\n";
python:
[(animal, print(animal)) for animal in ['cat', 'dog', 'cow']]
ruby:
['cat', 'dog', 'cow'].each {|animal| puts animal}
You say Tomato, I say Tomato.
#4
Posted 05 May 2010 - 02:14 PM
jayrulez, on 05 May 2010 - 01:05 PM, said:
It seems you are trying to configure authManager inside the application configuration instead of in it's sub-config 'components'.
make sure your authManager config is specified in the components array
make sure your authManager config is specified in the components array
I updated the module's readme.txt so that it should be clear where to place the AuthManager configuration in your application's config.
Thanks jayrulez for pointing this out.
Share this topic:
Page 1 of 1

Help












