Saturday, January 23, 2010

Framework and CakePHP

Framework and CakePHP

As a programmer I used to develops code in php and many languages but faced lot of security issues in my codes discussed with my friend regarding this he advised me to do codes in framework, ( web application framework is a software framework that is designed to support the development of dynamic websites, Web applications and Web services. )

Architectures of Framework

Model view controller (MVC)

I think most of the framework following MVC ( model view controller ) pattern means data model with business rules from user interface, and it is multiple interface stature.

Advantages
1) Security
2) Data access and mapping
3) URL mapping
4) Web template system
5) Automatic configuration

and i started to learn cake php,

Cake php

CakePHP is an open source web application framework with MVC architecture, you can download frame work from " http://cakephp.org/ " : website .

you will get help notes from : http://book.cakephp.org/ website .

i downloaded from cake php site i am using "XAMPP" for mysql and Apache , and put under "htdocs" folder so i can browse ,


Yellow mark showing errors and green mark showing working fine.

Under yellow mark i got bellow errors

  • Notice (1024): Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your application [CORE\cake\libs\debugger.php, line 682]
  • Your database configuration file is NOT present.
  • Rename config/database.php.default to config/database.php

Under Green Mark
  • Your tmp directory is writable.
  • The FileEngine is being used for caching. To change the config edit APP/config/core.php

To solve first error : under app /config folder take core.php file we can view a on 165th line bellow code :
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');

Plz change 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi' this code 'ADjsdfssd454asdfsdfsdfsdf' i put above code now , first error solved . it is code some what similar to API codes

Next step is database setup for that : for that create a db in mysql i crated "cakeapplication" named database after rename the file to "database.php.default" to "database.php" open that file and fill the details of dbname, dbhost, and password which you created

Now your cakePHP ready for create application

2 comments:

myobsd said...

why we chane the value of security.salt to this ADjsdfssd454asdfsdfsdfsdf

can u explain to me ? im new to framework. tq

demonical said...

Thank you