Error creating webapp

Hello all,

I am very new to Yii framework and I am having issues creating a webapp. My hosting server is MediaTemple and following is how I am setting the directory for Yii:

—framework (YiiRoot)

—html (WebRoot)

It has passed the requirements test. I am trying to create a webapp using $php yiic webapp ../html in the framework directory and I am getting the following error:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /nfs/c06/h05/mnt/12345/domains/ on line 59

Can anyone please help?


Your server is using php 4.

PoL, Thanks for replying. But I looked into the configuration and it says its using PHP 5.

can you put in your root folder a simple script taht contains phpinfo(), call it example.php and execute if from a browser, example (

This way you will see, among other things, the version that is already used when serving wev pages.

May be te version is 5 but not enough up to date!

Check the command line PHP version too… some hosting company alows to have PHP4 and PHP5 at the same time… so it can happen that the webpages uses PHP5 but in the command line that it uses PHP4

check with :

php -v

so how do I choose to run php5 via the command line?

Depends what you have in the PATH environment variable…

For example… If you type just PHP than the PATH will be searched for PHP.EXE (if it’s not in the current folder)

thanks for the tip. i was able to run

whereis php5

in terminal and then use that location to execute webapp