Yii Migration Tool Error: 'yiic: Command Not Found'

Hi all,

I have managed to configure Yii, PHPunit and Selenium to run on my Mac using MAMP Pro, thanks largely to Eric Barne’s excellent blog post, everything runs fine (google: PHP,Pear and PHPunit).

However when I go to the command line prompt and use Yii’s Migration Tool from within the websites /protected/ folder, I get the below error:

/Users/gary/WebRoot/trackstar/protected$ yiic migrate create create_project_table

-bash: yiic: command not found

Now the ‘yiic’ executable file is there in the /protected/ folder as well as the .php and .bat files.

It is probably a configuration issue but I do not know where to start. Can anyone can help enlighten me regarding this problem?

thanks in advance.

dot slash yiic !


It is a security feature of the Unix operating system: if you need to run executable from the current directory, you need to be explicit.

Well I be …!!

I had problems setting up the system and when I ran ‘./yiic’ commands I had errors. I just assumed that the book I am following did not exactly match my system ‘cause when I change directories I don’t use a preceding ’ / ’ unlike the book. Therefore I had thought the preceding ’ . /’ of the yiic command was superfluous.

Thanks for the explanation.


how to run this …yiic migrate --migrationPath=user.migrations with commant promt