Managing php settings.
composer require atukai/php-settings-middleware
To configure the php settings as you required, add the following to your config file
under php_setting
key:
'php_settings' => [
'display_startup_errors' => false,
'display_errors' => true,
'max_execution_time' => 30,
'date.timezone' => 'UTC',
'routes' => [
'home' => [
'memory_limit' => '32M',
'max_execution_time' => '60',
],
],
]
Add factory to container config
'dependencies' => [
'factories' => [
...
\At\PhpSettings\PhpSettingsMiddleware::class => \At\PhpSettings\PhpSettingsMiddlewareFactory::class,
...
],
],
Add the middleware to the pipeline
'middleware' => [
...
\At\PhpSettings\PhpSettingsMiddleware::class,
...
],
For more details of PHP ini configurations see