blank page

my website is blank don’t know what happen i think there is database problem but when i check main.php it works fine and i am new to yii so can u guys tell me how can i check error ?

Can define Sample Code for that facing issue then we can say

One issue may be Controller doesnt; load view properly or fail do that

Is Yii running in debug mode?

If it isn’t, turn it on. (Look at index.php)

If it is turned on, then you need to turn debugging on in your php.ini.

Check permissions of your application. And also check if your index.php point correctly at right yii framework path.

open the index.php and check

defined(‘YII_DEBUG’) or define(‘YII_DEBUG’,true);

should be true. And then check you have .htaccess activated.

i don’t know what to do any thing i am new to yii, i just do one thing what cihan say and i get nothing still show blank page



what is your OS (linux, windows, mac, …)?

  1. You have to look at your error log file. In case of linux and apache2 normally the location is /var/log/apache2/error.log (use: tail -f /var/log/apache2/error.log). Error log tells you what is wrong with yur application.

  2. Look at you php.ini file for diplay_errors. If your machine is not a production machine, turn it on (0 -> 1) an reload/restart your web server. (linux, apache2: /etc/php5/apache2/php.ini)

regards robert

i think it is Linux i think so, and other is that i can not get in apache folder getting error

Error: Directory /var/log/apache2: permission denied

Error: Failed to retrieve directory listing

how can i get access

  • Make sure the directory exists and if not create it

  • Set chmod to 777

Response: New directory is: "/var/log"

Command: chmod 777 "apache2"

Error: set attrs for /var/log/apache2: permission denied

Status: Retrieving directory listing…

Command: ls

Status: Listing directory /var/log

Status: Directory listing successful

Do we really need to walk you through how to use Unix?

How to setup Linux - Apache - MySQL - Apache (LAMP) ?

Hint: sudo chmod…

Read a newbie guide about how to setup LAMP on Linux - there’s lots of those. :)

friend i know how to do change permission but getting error again and again i am trying file zilla

Try logging in as root

You don’t know a God Damn thing about how to set permissions.

Try and set them as root : sudo chmod.

And go and read a tutorial or something.

thank you jacmoe i just find error thank you once again

now error is this

[Fri Dec 30 09:02:46 2011] [error] [client] PHP Warning: require_once(/var/www/../../framework/yii.php): failed to open stream: No such file or directory in /var/www/index.php on line 12, referer:

[Fri Dec 30 09:02:46 2011] [error] [client] PHP Fatal error: require_once(): Failed opening required ‘/var/www/../../framework/yii.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/www/index.php on line 12, referer:

and one more thing i forgot the permission. what was it before ??

As you can read, yii framework is not found as configured at line 12 in index.php. Change this path to existent one.


Closer… ! Thumbs up.

That you actually start getting error messages is an improvement. :)

i just make an big mistake i change path plus i delete error log file and reupload new error file but now it is not showing error this path i chose


// change the following paths if necessary



// remove the following lines when in production mode

//defined(‘YII_DEBUG’) or define(‘YII_DEBUG’,true);

// specify how many levels of call stack should be shown in each log message

//defined(‘YII_TRACE_LEVEL’) or define(‘YII_TRACE_LEVEL’,3);



Does this look right to you?




[color=#1C2837][size=2]If you do this:[/size][/color]


echo $yii;


[color=#1C2837][size=2]You will know that it’s not right.[/size][/color]