Posts

Showing posts from 2018

D8 KernelEvents constants

Here is a list of KernelEvents constants: KernelEvents::CONTROLLER ; // The CONTROLLER event occurs once a controller was found for handling a request. KernelEvents::EXCEPTION ; // The EXCEPTION event occurs when an uncaught exception appears. KernelEvents::FINISH_REQUEST ; //The FINISH_REQUEST event occurs when a response was generated for a request. KernelEvents::REQUEST ; // The REQUEST event occurs at the very beginning of request dispatching. KernelEvents::RESPONSE ; // The RESPONSE event occurs once a response was created for replying to a request. KernelEvents::TERMINATE ; // The TERMINATE event occurs once a response was sent. KernelEvents::VIEW ; // The VIEW event occurs when the return value of a controller is not a Response instance.

PHP - How to increase size of POST value in php

Problem: PHP/HTML Forms with more the >20 fields(which approx post more the 1000 characters) will end up in error or the posted values will not be received in form action because by default in php  max_input_vars is set to 1000 . Solution:   In this case you can increase the size of  max_input_nesting_level and  max_input_vars in php.ini to resolve. max_input_nesting_level: Sets the max nesting depth of input variables (i.e. $_GET, $_POST.) max_input_vars How many input variables may be accepted (limit is applied to $_GET, $_POST and $_COOKIE superglobal separately). Use of this directive mitigates the possibility of denial of service attacks which use hash collisions. If there are more input variables than specified by this directive, an E_WARNING is issued, and further input variables are truncated from the request.