Yii Framework Forum: Problem Running New Yii Webapp - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problem Running New Yii Webapp

#1 User is offline   André Santos 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 19-October 13

Posted 19 October 2013 - 07:19 PM

I'm having some problems running a new website created with yiic.
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?

#2 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,703
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 19 October 2013 - 07:40 PM

First of all, check your config file (config - components - user).

Next, try to use DB sessions (config - components):

‘session’ => array(
    ‘class’ => ‘system.web.CDbHttpSession’,
    ‘connectionID’ => ‘db’,

God is real unless declared as integer

#3 User is offline   nineinchnick 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 622
  • Joined: 12-September 11
  • Location:Bialystok, Poland

Posted 20 October 2013 - 04:48 AM

If you get a blank page you probably get a really fatal PHP error that couldn't be catched by Yii. Check your http server logs, a helpful message should be there.

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.
Don't be a dick.

#4 User is offline   Nabi 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 221
  • Joined: 22-February 12
  • Location:Iran / Ahwaz

Posted 08 December 2013 - 06:43 PM

I had exactly the same problem.
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 بگذارید.
که چشم‌مون در نیاد.
دمت گرم!


Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users