Hi any idea how to solve this error please in Yii 1.1

full error shows -Parse error:syntax error,‘protected’ (T_PROTECTED) in index.php on line 5

file as below-

line 1 <?php

line 2 date_default_timezone_set(‘Europe/London’);

line 3 // change the following paths if necessary

line 4 $yii=dirname(FILE).’/../framework/yii.php

line 5 $config=dirname(FILE).’/protected/config/main.php

// 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);



Line 4 and line 5 both lacks a single-quote and a semi-colon at the end. ;)

Are you not using an IDE to catch those errors? You should!

[color="#006400"]/* moved */[/color]

Try this.

[color="#1c2837"][size=2]line 1 ?php[/size][/color]

[color="#1c2837"][size=2]line 2 date_default_timezone_set(‘Europe/London’);[/size][/color]

[color="#1c2837"][size=2]line 3 // change the following paths if necessary[/size][/color]

[color="#1c2837"][size=2]line 4 $yii=dirname(FILE).’/../framework/yii.php’;[/size][/color]

[color="#1c2837"][size=2]line5 $config=dirname(FILE).’/protected/config/main.php’;[/size][/color]