Recommend this page to a friend! |
Download .zip |
Info | Example | View files (34) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2020-10-27 (4 months ago) | Not enough user ratings | Total: 43 This week: 1 | All time: 10,015 This week: 358 |
Version | License | PHP version | Categories | |||
beh-basic-error-hand 1.0 | GNU General Publi... | 5 | PHP 5, Debug, Language |
Description | Author | ||||||||
This class can handle PHP errors displaying them using templates, Recommendations I need a PHP class for capturing a pdf signature |
|
<!-- __SEMANTIC_VERSION_LINE__ -->
Acronym: [BEH].
Name: Basic Htaccess Error Handler.
Dependencies: Stand Alone / PHP v7.4.
[BEH] is a very simple PHP [error handler] implementation that throws [ErrorException] exceptions instead of using the default PHP error handling behaviour. This means that all runtime errors including Fatal are presented to the developer in the form of an exception. It also means that any unhandled errors are delivered to a single point: the global exception handler. also includes support for login errors with [error document]
[error document]: https://httpd.apache.org/docs/2.4/es/custom-error.html [error handler]: http://php.net/set_error_handler [errorexception]: http://php.net/ErrorException
Developers need the ability to decide how their code behaves when an error occurs. Exceptions offer the only truly consistent way to report and recover from errors in PHP.
This method of handling errors has proven to be extremely effective. Similar strategies are used in major PHP frameworks such as [Laravel]. [BEH] is a standalone implementation that can be used for any project, and not required third party library or software.
if you want to collaborate with the development of the library; You can express your ideas or report any situation related to this in: https://github.com/arcanisgk/BEH-Basic-Error-Handler/issues
Note: not tested in NGINX
It must be configured manually in: .htaccess
, .user.ini
and conf.json
depending on the scenario or desired host configuration; let's leave some examples:
# php_value auto_prepend_file "/var/www/html/error/init_error.php"
# php_value auto_prepend_file "/var/www/virtual-hostc/git-hub-project-name/error/init_error.php"
php_value auto_prepend_file "C:/xampp/htdocs/error/error_init.php"
Note: because of dependencies you must set the configuration inside <IfModule mod_php7.c>
to work correctly; .htaccess
file have an example
# auto_prepend_file = "/var/www/html/error/init_error.php"
# auto_prepend_file = "/var/www/virtual-host/git-hub-project-name/error/init_error.php"
auto_prepend_file = "C:/xampp/htdocs/error/error_init.php"
note: .user.ini
files not use php_value
statement.
.htaccess
file:ErrorDocument 400 /error/error_server.php
skin of [BEH] must be: basic, bs4, custom.
you must implement two files skin like. - sk_custom_server_error.php - sk_custom_handler_error.php
you must add the same variable print like basic skin, but you can use your own html design.
Files | / | error |
File | Role | Description | ||
---|---|---|---|---|
skin (6 files, 2 directories) | ||||
conf_error.php | Conf. | Configuration script | ||
handler_error.php | Class | Error handler class | ||
init_error.php | Aux. | Auxiliary script | ||
server_error.php | Aux. | Auxiliary script |
Files | / | error | / | skin |
File | Role | Description | ||
---|---|---|---|---|
src (13 files) | ||||
webfonts (5 files) | ||||
sk_basic_handler_error.php | Aux. | Auxiliary script | ||
sk_basic_server_error.php | Aux. | Auxiliary script | ||
sk_bs4_handler_error.php | Aux. | Auxiliary script | ||
sk_bs4_server_error.php | Aux. | Auxiliary script | ||
sk_custom_handler_error.php | Aux. | Auxiliary script | ||
sk_custom_server_error.php | Aux. | Auxiliary script |
Files | / | error | / | skin | / | src |
File | Role | Description |
---|---|---|
all.min.css | Data | Auxiliary data |
animate.css | Data | Auxiliary data |
bootstrap.css | Data | Auxiliary data |
bootstrap.css.map | Data | Auxiliary data |
bootstrap.js | Data | Auxiliary data |
bootstrap.js.map | Data | Auxiliary data |
destyle.css | Data | Auxiliary data |
error.css | Data | Auxiliary data |
favicon.ico | Data | Auxiliary data |
favicon.png | Data | Auxiliary data |
jquery.min.js | Data | Auxiliary data |
popper.min.js | Data | Auxiliary data |
reset.css | Data | Auxiliary data |
Files | / | error | / | skin | / | webfonts |
File | Role | Description |
---|---|---|
fa-brands-400.svg | Data | Auxiliary data |
fa-duotone-900.svg | Data | Auxiliary data |
fa-light-300.svg | Data | Auxiliary data |
fa-regular-400.svg | Data | Auxiliary data |
fa-solid-900.svg | Data | Auxiliary data |
beh-basic-error-hand-2020-10-27.zip 2875KB | |
beh-basic-error-hand-2020-10-27.tar.gz 2873KB | |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.