Matias Posted February 16, 2015 Share Posted February 16, 2015 Hi, I'm frustrated with the first practical example of the book. I'm trying to create the first application using yiic from osx terminal but I can't. I installed Yii on a web server and followed all the instructions in the book and the forum but doesn't work. Thank's for your help. Link to comment Share on other sites More sharing options...
Larry Posted February 16, 2015 Share Posted February 16, 2015 Sorry for the frustration! Could you confirm: are you using Yii 1 or Yii 2? Also, what exact errors or problems are you seeing? Just saying "I can't and "doesn't work" doesn't give us anything to help you debug this. Be as specific as you can as to the steps you're taking, the exact commands you're typing, and the exact results you're getting. Link to comment Share on other sites More sharing options...
Matias Posted February 16, 2015 Author Share Posted February 16, 2015 Hi Larry, thanks for your reply. Your book is very comprehensive and dynamic. I'm a php developer, but didn't have too much experience programing in terminal. I just follow the steps mentioned in your book and yii web page. 1) Acording to de book i installed the previous version of Yii (1.1.16), in my online web server. 2) YiiRoot = http://www.flagdc.com/00-resources/yii/ WebRoot = http://www.flagdc.com/proyectos/ 3) First i try the Book example in Terminal: cd http://www.flagdc.com/proyectos/ http://www.flagdc.com/00-resources/yii/framework/yiicwebapp helloworld ...And I get: ~ No such file or directory 4) Then i try with a tutorial en yii ewb page: (http://www.yiiframework.com/doc/guide/1.1/es/quickstart.first-app) Terminal: cd http://www.flagdc.com/proyectos/testdrive ~ No such file or directory php http://www.flagdc.com/00-resources/yii/framework/yiic.phpwebapp http://www.flagdc.com/proyectos/testdrive ~ Could not open input file Thanks for your support. Regards! Link to comment Share on other sites More sharing options...
Larry Posted February 17, 2015 Share Posted February 17, 2015 Thanks for providing those details. The problem here is one of the web server vs. the file system. Anything that goes through http:// (or https://) is an address that works over a network. The vast majority of the time, these are meant to be accessed through a web browser. When you go to http://example.com/index.phpin your Web browser, you get directed to the server that has http://example.com, and the request for index.php is handled by the web server application, such as Apache. Apache could then provide virtually any file on the server to complete the request. On the other hand, you have the file system, which is the combination of drives, directories, and files found on a computer. You don't say what operating system you're using, but on Windows you can use the Windows Explorer to navigate them (I think), on Mac OS X you use the Finder. In non-graphical environments, such as a console window (Windows) or a Terminal (Mac), you use the `cd` command to navigate it (for "change directory"). Before you do anything else, you should read up on using the terminal: https://www.digitalocean.com/community/tutorials/an-introduction-to-the-linux-terminal When you type something like `cd http://www.flagdc.com/proyectos/`,you're saying "change directory to this web site", which makes no sense. You need to cd to an actual directory on your computer. Further, to cd to an actual directory on the server, you'd need to first get yourself onto that server, via SSH. So you'll want to read up on all this and get comfortable with the file system vs. a URL. You should probably also learn how to run a web site locally (on your computer) so that you don't have to worry about connecting to a remote server. Link to comment Share on other sites More sharing options...
Larry Posted February 17, 2015 Share Posted February 17, 2015 Sorry, you do say in the subject that you're using a Mac. So, just for comparison, in the Finder, you can open a Finder window and navigate to your home directory or the Desktop. In the Terminal, you would use `cd ~/` to get to your home directory and `cd ~/Desktop` to get to the Desktop. Link to comment Share on other sites More sharing options...
Matias Posted February 17, 2015 Author Share Posted February 17, 2015 Thank you very much Larry for such detailed information. I will try again from my local server to avoid this issue, I use XAMPP for that. Thanks again for your help. Link to comment Share on other sites More sharing options...
Recommended Posts