Tuesday, November 1, 2011

Installing Yii Framework in XAMPP

Here I will discuss the details of the installation steps Yii Framework. But before, there are some you need to prepare to install Yii:
  • Yii Framework - Download at http://www.yiiframework.com/download/
  • Web and database Server, here I am using XAMPP - Download at http://www.apachefriends.org/en/xampp.html
  • Web Browser, here I use Mozilla Firefox - Download at http://www.mozilla.org/id/firefox/new/
After you download all, let's start installing yii. Here, I use windows 7 as the operating system.

1. Install XAMPP, here I did not explain how to install it, but just to be safe when the computer error and have to reinstall, it should be installed on a drive other than C, such as drive D, E, or others. Here I installed on drive D

2. Extract yii-x.x.x.xxxxx.tar.gz that you download, then change its name to yii, and to be more easily placed in the folder XAMPP/htdocs, so that such XAMPP/htdocs/yii.

3. Open the comand line by pressing ctrl + r and type cmd

Installing Yii Framework in Xampp
Yii Web Application
Microsoft Windows [Version 6.1.7600]
Copyright 2009 Microsoft Corporation. All rights reserved
C: \ Users \ santje>

4. Typed in the comand-line d:

Microsoft Windows [Version 6.1.7600]
Copyright 2009 Microsoft Corporation. All rights reserved
C: \ Users \ santje> d:
D: \>

5. Typing again cd xampp

Microsoft Windows [Version 6.1.7600]
Copyright 2009 Microsoft Corporation. All rights reserved
C: \ Users \ santje> d:
D: \> cd xampp
D: \ xampp>

6. After that typing cd php

Microsoft Windows [Version 6.1.7600]
Copyright 2009 Microsoft Corporation. All rights reserved
C: \ Users \ santje> d:
D: \> cd xampp
D: \ xampp> cd php
D: \ xampp \ php>

7. Typing again php.exe D:\xampp\htdocs\yii\framework\yiic webapp D:\xampp\htdocs\yiicode
Description: D: \ xampp \ htdocs \ yiicode means the application will be installed on xampp - htdocs, while yiicode is the name of my application to be made

Microsoft Windows [Version 6.1.7600]
Copyright 2009 Microsoft Corporation. All rights reserved
C: \ Users \ santje> d:
D: \> cd xampp
D: \ xampp> cd php
D: \ xampp \ php>
D: \ xampp \ php> php.exe D:\xampp\yii\ framework\yiic\webapp D:\xampp\htdocs\yiicode
Create a Web application under 'D: \ xampp \ htdocs \ yiicode'? [yes: no]

8. The last typed yes and enter.
Your application has been succesfully created under D: \ xampp \ htdocs \ yiicode

9. Open xampp-control.exe click the start button on the Apache and MySQL, and then open your web browser and type localhost/yiicode. Congratulations you have successfully created your first application yii

38 comments:

  1. hi, I'm a beginner .. I have managed to install yii on my localhost by following this tutorial. But for XAMPP, previously I've installed it on drive C is not D. Is this going to cause problems that means for future development?

    ReplyDelete
    Replies
    1. No, I installed on drive D to avoid an error occurs on a computer, nothing to do with yii application development. It was just an option that does not depend, up to you.

      Delete
  2. Great tips, thank you for sharing them.
    Save a lot of headaches.

    ReplyDelete
  3. A very complete tutorial. This is so good, thanks...

    ReplyDelete
  4. very helpful. Thankyou

    ReplyDelete
  5. Really very helpful. Thankyou, Thankyou very much

    ReplyDelete
  6. Good Tutorial ...was great help..Cheers!!!

    ReplyDelete
  7. why is my yiicode base url are redirecting to my other base url localhost.

    sample : when i type yiicode.localhost is redirecting to my existing website1.localhost although i seperate it in my httpd-vhosts.conf.

    can anyone help me around here.

    ReplyDelete
  8. Good Tutorial. Thanks

    ReplyDelete
  9. oh thanks man Great tutorial awesome i will say superb ...

    ReplyDelete
  10. superb tutorial man i was searching this type of tutorial from yesterday at last found and installed yii on xamp thnx buddy for nice and complete tutorial...

    ReplyDelete
  11. I am a beginner and your help is greatly appreciated. Your tutorial gave me confident to work with Yii and PHP thank you. Kind Regards, Ram

    ReplyDelete
  12. Great tips..thanks :)

    ReplyDelete
  13. Fentastic tutorial..........

    ReplyDelete
  14. Nice One. Try to give a tutorial on how to remove the YII from Xampp too... it will be helpful... :)

    ReplyDelete
  15. Super. very useful

    ReplyDelete
  16. thanks, working fine !!!

    ReplyDelete
  17. Superb job. Very helpful ......

    ReplyDelete
  18. Doesn't work the same way if we call
    C:\xampp\php\php.exe C:\xampp\htdocs\trackstar\protected\yiic shell

    Error: index.php does not exist or is not an entry script file.

    ReplyDelete
    Replies
    1. Please try again according to the steps above
      C:\xampp\php>php.exe c:\xampp\yii-v-x.x.xx\framework\yiic\webapp c:\xampp\htdocs\yourwebappname

      Delete
  19. Thanks bhai Tune tune to mere mahino ka problem minto me solve ka dala THANKS Again.

    ReplyDelete
  20. Man! You saved me big time! Windows command prompt is so damn messed up. :D

    ReplyDelete
  21. Really great content... Thanks for sharing this much detailed information..

    ReplyDelete
  22. anyone can help my issue ? mine is not working

    I have got error message like this

    could not open input file: C:\xampp\htdocs\yii\framework\yiic

    ReplyDelete
    Replies
    1. where do you instal xampp?
      do you have download Yii Framework 1.1.x, rename to yii and save in htdocs?

      Delete

  23. Thank you for the info. It sounds pretty user friendly. I guess I’ll pick one up for fun. thank u

    Angularjs Development Company - Nintriva

    ReplyDelete
  24. Great article on how to install Yii Framework on Xampp.By the way we are a software company based in haryana and looking for hire yii developer and also Hire Concrete 5 Developers.

    ReplyDelete

Yii Framework Tutorials