Tuesday, November 26, 2013

Yii Quick Start 1 (Download Startup files) (UsbWebserver)

Yii Quick Start 1

  • Introduction
  • Setting up the Apache-MySQL-PHP server and Yii Framework
  • Conclusion

Introduction

This tutorial attempts to provide the quickest way for a person to start understanding and using Yii Framework. No prerequisite knowledge is necessary. You just need to have a Windows PC in order to follow the steps below.

Setting up the Apache-MySQL-PHP server and Yii Framework

1) Download the starter file from here, https://drive.google.com/file/d/0B86b-ALn-1MGLVlZLXQ0Vk9UWnc/edit?usp=sharing . It’s a prepackaged files containing usbwebserver Apache-MySQL-PHP bundle, Yii framework, Yii demos and Yii webapp site.

2) The filename that you download is USBWY.zip. If you unzipped it, it may have the following structure.
It is recommended that you extract the file contents close to your computer root, e.g. C:\Z\USBWY...

3) Notice the file name usbwebserver.exe and the folder name “root”.
4) Run usbwebserver.exe.
If you get a non-english words like the above, click the button “Instellingen” and change the language to English. Click “Opslaan” to Save your option.
5) In the General panel of the USBWebServer Control Window, notice the button “Root dir” and “Localhost”.
6) If you click “Root dir”, you would get the File Explorer application browsing the root folder (refer Step 2)
7) Go into the root folder.
Notice the file index.php
8) Refer to Step 5, click on the button “Localhost”.
This is the web page rendered by the file index.php in Step 7.
9) Add “/yii” to the URL above.
The content of yii folder is displayed.
However, if you browse the file using File Explorer, you may notice that one folder is missing in the above list.
10) Go into the folder “framework”.
Notice that there is a file “.htaccess”.
The file contains the command “deny from all”.
That’s why the folder is not visible.
Even if you add the folder name to the URL, you will get page error.
11) The Steps 9 and 10 demonstrates the function of .htaccess in Apache server that controls the web access to files and folders on a website.
It doesn’t belong to Yii Framework but it helps to protect the Yii Framework files from unauthorized access and use.

You should get the Yii Blog Demo. This demo websites shows you the example of Yii Framework application.

Conclusion

This is a simple preconfigured setup for Yii Framework aimed at helping a beginner to quickly understand and use the framework. It may not be the best setting for production server. As you follow through this tutorial series, you may learn a better way of setting up Yii Framework for production server.

1 comment:

  1. This is really an awesome article. Thank you for sharing this.It is worth reading for everyone.
    Hire Yii Developers in India

    ReplyDelete

Labels