How to configure cakephp3 using composer?

1) Make sure following extension in enabled in you php.ini

 

Goto Your PHP bin folder of you xamp/wamp

 

Also Note: CakePHP require PHP5.6 and above to run.

2)Run The following command from Command Prompt one by one

 

3)Now Copy the  composer.phar which is recently genrated goto Your Project dir and paste the comoser.phar here.

4) Now go to just above project dir using command prompt. C:\xampp\httpd\

 

Once Composer finishes downloading the application skeleton and the core CakePHP library. All your project will be under
cake-demo

5) now goto C:\xampp\htdocs\cake-demo\bin and run the following commmand:

your first cakephp up and running at following http://localhost:8765/

Following are the X-Frame-Options which we can use:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

X-Frame-Options: DENY
X-Frame-Options: SAMEORIGIN
X-Frame-Options: ALLOW-FROM https://example.com/

But in our case X-Frame-Options: ALLOW-FROM will work. but this option is not compatible with all browser.

So other way is Content-Security-Policy

https://en.wikipedia.org/wiki/Clickjacking

# Allow specific origins to embed this content
Content-Security-Policy: frame-ancestors example.com wikipedia.org


Other use full link as below to implement “Content-Security-Policy”

http://stackoverflow.com/questions/30280370/how-does-content-security-policy-work
https://content-security-policy.com/
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors

Zend Framework Web Development Tips And Tricks

Zend Framework Web Development Tips And Tricks

What is Dispatcher ?
Dispatcher

Dispatcher converts Requests into controller actions. It uses the dispatched Request to locate and load the correct controller. If found, the requested action is called on the controller.

Overview

Dispatching is the process of taking the request object, Zend_Controller_Request_Abstract, extracting the module name, controller name, action name, and optional parameters contained in it, and then instantiating a controller and calling an action of that controller. If any of the module, controller, or action are not found, it will use default values for them. Zend_Controller_Dispatcher_Standard specifies index for each of the controller and action defaults and default for the module default value, but allows the developer to change the default values for each using the setDefaultController(), setDefaultAction(), and setDefaultModule() methods, respectively.

Cake PHP Tips and Tricks

Cake PHP Tips and Tricks

Question:What is meant by MVC?

Ans: Model view controller, it is a software architecture, used to isolates business logic from presentation logic. cakephp is based on mvc pattern.
Question: What is the first file that gets loaded when you run a application using cakephp?
Ans: The very first file being loaded is index.php in the webroot folder, which will add CakePHP’s core in the include path which is bootstrap.php  and it can be changed , either through index.php , or through htaccess.

Read More →

How to create virtual host in WAMP Zend:

Zend Framework Web Development Tips And Tricks

Zend Framework Web Development Tips And Tricks

  Step1:

If you are using windows system go to following location:
change host file system32/etc/ and open hots file.

add the following : 127.0.0.1    zend.test.loc

 

 

 

Step2:

Add Virtual Host go to

or where ever your httpd-vhosts and add the following :

Read More →

Zend Framework Web Development Tips And Tricks

Zend Framework Web Development Tips And Tricks

Create Multiple DB Object in ZEND