Yiic problem in Ubuntu

Hi there! I already finished checking the requirements in yii and it was ok..

my problem is everytime i create a new application using this yiic command

bash yiic webapp demo

it gives me this error

yiic: line 2: ?php: No such file or directory
yiic: line 3: /bin: is a directory
yiic: line 4: base: command not found
yiic: line 5: base: command not found
yiic: line 6: base: command not found
yiic: line 7: base: command not found
yiic: line 8: syntax error near unexpected token `newline'
yiic: line 8: ` * @author Qiang Xue <qiang.xue@gmail.com>'

im a newbie in yiic and any help would be appreciated. Also I'm using Ubuntu 10.04, Mysql, Php 5 and Apache 2

4) It will ask a confirmation from you if you really want to create a web application under /MyWebroot/demo, so just type in there Yes and hit enter. It will create all the default files and folders for the framework's web application skeleton .

Notes:
* bash and ./ wont work because yiic is not an ubuntu or even a linux command. As a matter of fact, I was able to run yiic in the command prompt of windows 7!
* I extracted Yii right in my apache's documentroot. If you placed it (extracted Yii files) inside a folder under your documentroot, you need to change the directory in step #3 to access yiic
* There might be a need to change the yiic file's permission for it to become executable (like chmod +x) if permission denied error appears when executing step #3.
* If ever you encounter the error "/usr/bin/env: php: No such file or directory", just install php5-cli

when I tried to run from the command line php -v , it said php was not installed.

I discovered my version of Ubunut (karmic) did not have the php cli installed, webpage processing worked fine, but php5 from the command line interface did not work. so I had to sudo apt-get install php5-cli
that also failed, so I had to type sudo apt-get update to update all the apt locations, and then run the install of php5 cli

then I was able to run the command line magic to create the testdrive !

when I tried to run from the command line php -v , it said php was not installed.

I discovered my version of Ubunut (karmic) did not have the php cli installed, webpage processing worked fine, but php5 from the command line interface did not work. so I had to sudo apt-get install php5-cli
that also failed, so I had to type sudo apt-get update to update all the apt locations, and then run the install of php5 cli

then I was able to run the command line magic to create the testdrive !

Nothing but errors here. It also seems everybody posting as a different solution which is never a good thing.

Error: The directory 'var/www/Industry_Assignment' is not valid. Please make sure the parent directory exists.

USAGE
yiic webapp <app-path>

DESCRIPTION
This command generates an Yii Web Application at the specified location.

PARAMETERS
* app-path: required, the directory where the new application will be created.
If the directory does not exist, it will be created. After the application
is created, please make sure the directory can be accessed by Web users.

I don't know what you mean by path for Yii. Maybe path to yiic, which is the place you unpacked the YiiFramework archive. If you have your copy of YiiFramework in ~/yii/ then yiic will be in ~/yii/framework/yiic.

The yiic file is just a bash script that runs yiic.php using PHP. If you open it in a text editor, you can see: