2017 © Pedro Peláez
 

library webjawns-php-config

Allows setting of php.ini options per controller, per route, and globally in ZF2

image

webjawns/webjawns-php-config

Allows setting of php.ini options per controller, per route, and globally in ZF2

  • Monday, January 6, 2014
  • by cstrosser
  • Repository
  • 2 Watchers
  • 2 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Webjawns PHP Configuration

Webjawns PHP Configuration (http://webjawns.com) is a Zend Framework 2 module allowing global, per controller, and per route configuration of php.ini options using a standard configuration file. For example, developers can set a global memory limit, while increasing or decreasing it to meet a particular route or controller's requirements. The same applies to any other INI option (e.g. max_execution_time, max_input_vars, etc.)., (*1)

Priority

If the same INI option is defined for a route and controller, as well as globally, the route option takes precedence. If the same INI option is defined globally and for a controller, the controller option takes precedence. The priorities are as follows, with the first position having precedence:, (*2)

  1. Route
  2. Controller
  3. Global

Installation

  1. Install the module via Composer by running:, (*3)

    php composer.phar require webjawns/webjawns-php-config:dev-master
    

    or download it directly from GitHub and copy it to your application's module/ directory., (*4)

  2. Add the WebjawnsPhpConfig module to the modules section of config/application.config.php.
  3. Create or edit an autoloaded configuration file and customize your php.ini options. ``` return array( 'webjawns_php_config' => array( // Whether to throw a RuntimeException if ini_set() returns false 'throw_exception_on_failure' => true,, (*5)

       'display_errors'     => '1',
       'date.timezone'      => 'UTC',
       'max_execution_time' => '15',
       'memory_limit'       => '16M',
    
       'controllers' => array(
           'Application\Controller\Index' => array(
               'memory_limit' => '64M',
           ),
       ),
    
       'routes' => array(
           'home' => array(
               'memory_limit'       => '32M',
               'max_execution_time' => '30',
           ),
       ),

    ), );, (*6)

The Versions

06/01 2014

dev-master

9999999-dev http://webjawns.com

Allows setting of php.ini options per controller, per route, and globally in ZF2

  Sources   Download

BSD-3-Clause

The Requires

 

php ini zf2 options ini_set