WIKINDX API trunk

WEBSERVERCONFIG.php

WIKINDX : Bibliographic Management system.

Tags
see
https://wikindx.sourceforge.io/

The WIKINDX SourceForge project

author

The WIKINDX Team

license

https://www.isc.org/licenses/ ISC License

Table of Contents

Functions

wkx_error_handler()  : bool
Custom PHP errors handler
wkx_shutdown_handler()  : mixed
Shutdown Handler
wkx_exception_handler()  : mixed
Custom handler for uncaught exceptions
wkx_error_log()  : void
Write a message to the application log
wkx_error_function_args()  : void
Prints in tabular format the positional arguments of a function to the logs
wkx_clear_error_log()  : mixed
Remove expired error logs (14 days max) and limit their size to 25 MB by file
buildUpgradePage()  : mixed

Functions

wkx_error_handler()

Custom PHP errors handler

wkx_error_handler(int $errno, string $errstr, string $errfile, int $errline) : bool

cf. https://www.php.net/manual/fr/function.set-error-handler.php

The $errcontext parameter is not used because it is deprecated since PHP 7.2 It is no longer possible to know the context of the error. Instead we use the debug_print_backtrace() function.

NB: fatal errors like ‘parse error’ are still written in the log defined by error_log php.ini option because this handler cannot be called in that case.

Parameters
$errno : int

PHP error code

$errstr : string

PHP error message

$errfile : string

File or script where the error occurred

$errline : int

Error line number

Return values
bool

wkx_shutdown_handler()

Shutdown Handler

wkx_shutdown_handler() : mixed

Vérifie si la dernière erreur était fatal, et dans ce cas inscrit les informations de débogage dans la trace global car le script ne peut pas intercepter ce genre d'erreur lui-même.

Check if the last error was fatal on shutdown, and if so, log the debugging information to the global trace, as the script cannot intercept this type of error itself.

cf. https://www.php.net/manual/en/function.register-shutdown-function.php cf. https://www.php.net/manual/en/function.set-error-handler.php

wkx_exception_handler()

Custom handler for uncaught exceptions

wkx_exception_handler(Throwable $exception) : mixed

This will trigger instead of the PHP one, if the script has not intercepted it itself.

Then PHP terminates the script on its own.

cf. https://www.php.net/manual/en/function.set-exception-handler.php

Parameters
$exception : Throwable

wkx_error_log()

Write a message to the application log

wkx_error_log(mixed $Message) : void

When the application is not yet configured, the message is written to the log defined by php.ini.

Parameters
$Message : mixed

Message

wkx_error_function_args()

Prints in tabular format the positional arguments of a function to the logs

wkx_error_function_args(string $func_name, string $func_args) : void

To use this function, add at the top of the traced function body: wkx_error_function_args(FUNCTION, func_get_args()); or wkx_error_function_args(METHOD, func_get_args());

Parameters
$func_name : string

Function name (e.g. pass FUNCTION)

$func_args : string

Function arguments (e.g. pass func_get_args())

wkx_clear_error_log()

Remove expired error logs (14 days max) and limit their size to 25 MB by file

wkx_clear_error_log() : mixed

buildUpgradePage()

buildUpgradePage(string $body) : mixed
Parameters
$body : string

        
On this page

Search results