milo99 0 Posted May 20, 2012 Report 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. Quote Link to post Share on other sites
Edward 108 Posted May 20, 2012 Report 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. Quote Link to post Share on other sites
milo99 0 Posted May 20, 2012 Author Report 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. Quote Link to post Share on other sites
Edward 108 Posted May 21, 2012 Report 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. Quote Link to post Share on other sites
Larry 428 Posted May 21, 2012 Report 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 Quote Link to post Share on other sites
Paul Swanson 104 Posted May 21, 2012 Report 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. Quote Link to post Share on other sites
milo99 0 Posted May 25, 2012 Author Report 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 :-) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.