tenkoma / cakephp-apache-error-theme
Make error pages Apache web server style.
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:cakephp-plugin
Requires
- cakephp/cakephp: ^3.3
This package is not auto-updated.
Last update: 2024-04-22 14:37:54 UTC
README
Make error pages Apache web server style.
Installation
You can install using composer.
composer require tenkoma/cakephp-apache-error-theme
Enable Plugin
You can load the plugin using the shell command:
bin/cake plugin load CakeApacheErrorTheme
Or you can manually add the loading statement in the config/bootstrap.php file of your application:
// config/bootstrap.php Plugin::load('CakeApacheErrorTheme');
Enable theme
set theme in the ErrorController::beforeRender()
.
// src/Controller/ErrorController.php public function beforeRender(Event $event) { parent::beforeRender($event); $this->viewBuilder()->theme('CakeApacheErrorTheme'); }
and debug = false
in the config/app.php
// config/app.php 'debug' => false,
Configure
// config/bootstrap.php Configure::write('CakeApacheErrorTheme', [ 'signature' => 'cake', 'email' => 'webmaster@example.com', ]);
signature
apache
(default)cake
show CakePHP and version as signature.
email
(default=webmaster@localhost
) E-mail address to be displayed at 5xx error