Problem Running New Yii Webapp
Posted 19 October 2013 - 07:19 PM
I was following the tutorial to create a new webapp, however when I run localhost/demo/index.php I just got the header "My Web Application", nothing else.
I searched the php files from the website to try to check the problem and I found the problem in the file demo\protected\views\layouts\main.php. If I remove the reference to Yii::app()->user->isGuest and Yii::app()->user->name of the menubar the site works properly.
Can anyone explain me why this is not working?
I'm running yii on Windows 8 with IIS 8 and PHP 5.5.4.
Additionally, when I try to use gii tool, through localhost/demo/index.php?r=gii I get a blank page , and I have already uncommented the gii lines in demo\protected\config\mainh.php.
Can anyone help me?
Posted 19 October 2013 - 07:40 PM
Next, try to use DB sessions (config - components):
‘session’ => array( ‘class’ => ‘system.web.CDbHttpSession’, ‘connectionID’ => ‘db’, ),
Posted 20 October 2013 - 04:48 AM
If you get a Yii error page there is a complete error message along with a stack trace in the application log at protected/runtime/application.log.
In your development enviroment it's useful to see that full message directly on the page and this requires enabling the debug mode by defining the YII_DEBUG constant to true (see index.php). This should be done via your http server configuration using enviromental variables.
Remember, never show too much error information on production servers, this could reveal sensitive information leading to an attack.
You user error indicacates you got something wrong in the WebUser class. An error message and your component configuration would be really helpful.
I don't know why ORey suggested using db sessions. You can't really solve a problem until you know what it is. Guessing is a waste of time IMHO.
Posted 08 December 2013 - 06:43 PM
After very effort, I find the problem in session path!
َAt solution set session.save_path in php.ini with appropriate value. and Don't forget write permission for that path.
وقتی پیغام میذارید، بی زحمت متنتون رو انتخاب کنید و این دو تا کار ناقابل رو هم انجام بدید:
1. از اون بالا RTL رو انتخاب کنید.
2. فونت رو هم Tahoma بگذارید.
که چشمون در نیاد.