milo99 Posted May 20, 2012 Share Posted May 20, 2012 Hi Larry, I bought your book PHP and MYSQL for dynamic websites and have found it very easy to follow. I am completely new to PHP so that was important. I am actually a graphic designer but my company is working on a huge project that is built on the yii framework so they want us ALL to learn it. I am having a problem right from the get go with the terminal command. Nothing I type in seems to work. I am having trouble even understanding why I need to use terminal. I am not sure if this helps but I have installed MAMP on my Macbook Pro. I ran this after I installed yii and it passed: http://localhost:8888/yii/requirements/ My yii is installed here: /Applications/MAMP/htdocs/yii Please someone tell what I need to type into terminal to continue with yii. I won't be able to learn it I don't think if I can't get past this first step. Link to comment Share on other sites More sharing options...
Edward Posted May 20, 2012 Share Posted May 20, 2012 Just follow the installation guide on yiiframework.com, instructions are there for setting up a yii app with Mac terminal. I have made yii app's both with windows and Mac using those guides so you should be fine. If you are confused with terminal run the name in google to get terminal functions list from wikipedia.com. Link to comment Share on other sites More sharing options...
milo99 Posted May 20, 2012 Author Share Posted May 20, 2012 Hmm still no luck... this is what it says on the yii site: % cd WebRoot on my computer I think that is... % cd Library/WebServer/Documents but it says '-bash: fg: %: no such job' when I hit enter % php YiiRoot/framework/yiic.php webapp testdrive on my computer I think this is... % php Applications/MAMP/htdocs/yii/framework/yiic.php webapptestdrive but it says '-bash: fg: %: no such job' when I hit enter I have tried this in so many variations now that I think I am going to go insane. Nothing works. Link to comment Share on other sites More sharing options...
Edward Posted May 21, 2012 Share Posted May 21, 2012 Here is the line i used to generate the app from terminal on my mac book: Edward-Carnby-MacBook:htdocs Edward$ php yii/framework/yiic.php webapp sitename sitename is the the name of your app. What i done is i copied the yii framework folder in to the applications/mamp/htdocs folder, i renamed the yii folder yii, as before it contained info of the version number. Then i changed the file path to htdocs in terminal then run the yii command in the line above to generate the app. If you are questioning your sanity, that means your are still sane, Anders Behring Breivik is a good example of someone who is not. Link to comment Share on other sites More sharing options...
Larry Posted May 21, 2012 Share Posted May 21, 2012 Thanks for the nice words on my book. It is appreciated. You would do this: cd /Applications/MAMP/htdocs/yii php yiic.php webapp ../testdrive Link to comment Share on other sites More sharing options...
Paul Swanson Posted May 21, 2012 Share Posted May 21, 2012 Milo, I believe in the example you provided, the % character is being used to represent the prompt in Terminal. In Edwards example, his prompt is Edward$. In Windows, the > character is normally used as the prompt (e.g., C:\>). You need to type what comes after the % character. Link to comment Share on other sites More sharing options...
milo99 Posted May 25, 2012 Author Share Posted May 25, 2012 Thanks for your replies everyone. I did manage to get it working. I have decided to step back from the Yii side for a little while as I work my way through Larry's PHP book first. I will be back at it soon and am sure I will have a million questions for you when I do :-) Link to comment Share on other sites More sharing options...
Recommended Posts