Jump to content
Larry Ullman's Book Forums

Yiic First Example In Mac Terminal


Recommended Posts

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 post
Share on other sites

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 post
Share on other sites
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.



 

3) First i try the Book example in Terminal: 

 


 


 

...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:


~ No such file or directory

 


~ Could not open input file

 

Thanks for your support.

 

Regards!

Link to post
Share on other sites

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 post
Share on other sites

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 post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...