Month: August 2013

Starting a Project with Yii Framework

Downloads to Start with:


2. MySQL Workbench

3. Yii Framework


Steps to Get Environment Set Up:

1. Extract Yii Framework folder to a directory in xampp, create a new folder called library.

2. There is a folder in the yii directory called requirements, take that copy and paste into /xampp/htdocs

3. open: http://localhost/requirements

4. If Most of the blocks are green you are good, if not google and change php.ini , my.ini, httpd.conf or anything else accordingly.

5. Add PHP. MySQL, httpd and Yii to your environment variables.

6. That’s go to MyComputer, Right Click My Computer click properties then select advanced system settings on the left, click environment variables, then scroll down to path and click edit….add the following (it will depend on where you installed and your OS)

7. Test That mysql, php and httpd are working…Open CMD…type php -v….type mysql -u root -p….type httpd -v


Using Yiic and Commandline to Rapidly Create the blueprint for your Project

1. Open CMD as Administrator

2. Naviage to htdocs….cd xampp/htdocs

3. Type the following:

php yiic webapp [Your Project Name]
php yiic webapp [Your Project Name] git

if this doesn't work for you, like it didn't work for me use:

yiic.bat webapp [Your Project Name]

Now the Hard Work Starts

Cheat Sheet

View Hidden Files and Folders from:


windows: dir /a


linux: ls -a

Remove a folder cmd:


rmdir /s /q "C:\xampp\htdocs\[folder_name]"

View PhpInfo from CMD:

php -i


php -r “phpinfo();”

Create an Empty File (.htaccess) CMD:


Per Site Config Chnges in .htaccess

Add the following to .htaccess:
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_flag log_errors on
php_value error_log /home/path/public_html/domain/PHP_errors.log

Source: StackOverflow

Creating a User for MySQl on only 1 Schema

grant all on schema.* to 'username'@localhost identified by 'password';

Comments in .htaccess

Use a #