Monday, July 20, 2015

install yii1 framework using command line

0 comments
download yii zip file
extract in your htdocs or www directory (named as yii_framework)

Now in terminal
php yii_framework/framework/yiic webapp projectname

now your new Yii project is ready to development.

update your main.php file upder path "/protected/config"

uncomment your urlManager block.

connect to your database
comment your db array that contain sqlite statement with a file and add a array given below.

array(
        'connectionString' => 'mysql:host=localhost;dbname=testdb',
        'emulatePrepare' => true,
        'username' => 'root',
        'password' => '',
        'charset' => 'utf8',
        'tablePrefix' => '',// if you use any prefix for all tables in your database
    )

now your yii is connected with your database

add a .htaccess on project's root directory file for using your defined controller action.
----------
RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php
----------

install cakephp 3

0 comments
Hi,

download CAKEPHP
download cakephp
install composer.phar from command line

go to your php directory
For wampp
wamp/bin/php/php(php version)
For xampp
xampp/php
  here you find your php.exe file

php -r "readfile('https://getcomposer.org/installer');" | php

run php composer.phar command for create project
php composer.phar create-project --prefer-dist cakephp/app mynewcakephp

copy and paste your mynewcakephp directory to wampp/www directory.

You must enable the intl extension to use CakePHP 3.0.9
Copy and paste icu*.dll files from your wamp/bin/php/php(php version)
to wamp/bin/apache/apache(apache version)
Restart your wamp services

Connect to your database
update your config/app.php  Datasources section with your database credentials.

Enjoy Cakephp 3.0.9 :)