Start up

I am very new to php and yii. I tried not to be the guy on the forum that wants all the answers for nothing so I bought the book yii 1.1 and PHP 5 but I can’t even get started…I am on a Mac and installed MAMP and got everything working fine. I ran this and got passing grades: http//localhost:8888/yii/requirements/. This is as far as I can get though. I really don’t understand what I am supposed to type into ‘Terminal’ to get yiic working. I have tried several different ways but just simply do not understand the instructions from the book. So I am basically dead before I even get started. Any help would be appreciated.

Hi and welcome. It helped me a lot to follow the Learning Yii series from Larry Ullmann. Their link is on the tutorials page. Cheers

Also for MAMP, you may search in the forum for another thread about the terminal command to create a webapp with yiic. Basically, it’s




path/to/osx/bin/php yiic webapp yourtestapp



Hi bennouna,

Thanks.Actually the other book I bought which I have really enjoyed is PHP and MYSQL for Dynamic Websites by Larry Ullman. I wanted to purchase his book on Yii but they did not have it on Kobo.

Hi Again,

Sorry I still do not follow this. Will it help if I give you my path to Yii on my computer? Will you be able to tell me what I type into Terminal?

Applications/MAMP/htdocs/yii

I am not sure if that is the right place to put it but thats where it is:-)

Ok can you localize php binary on your mac? Not the one installed with MAMP. What you need is cd to Yii folder in terminal, then type the command I gave you above with the correct php path.

PS Ideally you needn’t specify php path but you’d need to add it to the Path environment variable (I’m not sure it’s called like that)

I was on my mobile so I hadn’t the exact syntax. So, eventually, I’m not using OS X’s php, but MAMP’s one, like below.

To make it clearer, I open Terminal.app and go the Yii framework folder (not the root), which I renamed in my case yfrm1110 (for 1.1.10 :) ) and I specify the full path of the php binary and also the webapp output folder, like this:

[font="Courier New"]MBP55-tellibus:~ bennouna$ cd /Applications/MAMP/yfrm1110

MBP55-tellibus:yfrm1110 bennouna$ /Applications/MAMP/bin/php5.3/bin/php yiic webapp /Applications/MAMP/htdocs/newDemoWebApp

Create a Web application under ‘/Applications/MAMP/htdocs/newDemoWebApp’? [yes|no] y

[/font]

I am on SL 10.6.8 and MAMP (the free version) 1.8.3