[Phpmyadmin-devel] Suggestions on Work of Week-1 | php Error Reporting Project

Dhananjay Nakrani dhananjaynakrani at gmail.com
Sat May 10 19:00:41 CEST 2014


Hi Everyone,
This week I started developments on my project. I want to take community's
opinion on work I've done so far. Look at the commits [0] & [1].

Currently `common.inc.php` does all error handling initializations. All the
run time php errors are already being collected in an object of `
PMA_Error_Handler` pointed globally by `$GLOBALS['error_handler']`.

Now, to report all errors I have created a separate script named
'common_error_reporting.inc.php' which is intended to be included at the
end of all "*relevant*" scripts. Currently it dumps all collected errors in
a local-temporary file named "pma_error_log.txt" (which will be removed in
next week's work). To demonstrate the working of `
common_error_reporting.inc.php`, I've included that script at the end of `
index.php`. Please have a look at it at [0] & [1].
Is there any better way of doing the same? Please point out if I can
improve it any further. If there are no changes required in it then I would
do the same for all "*relevant*" scripts.


Another doubt I have is about the relevance of scripts. Which scripts
should be consider as relevant here?? I am thinking of considering all
scripts that are directly called by user/browser. I think error reporting
script does not need to be included at the end of class files and such
other library files. In my opinion, the error reporting script should be
included at the end of all scripts in project root directory and not in any
files inside `/libraries/` directory. Am I correct on this?


I also found that PMA triggers errors manually (using trigger_error()) for
all the missing extensions and to raise other such user warnings. These
warnings are also currently collected by error handler. Do we need to
report them?? Or should the errors of E_USER_WARNING type just be ignored
while sending reports?


Please provide your valuable suggestions and do correct me if I am wrong
anywhere. If possible do it at the earliest so that I can incorporate them
at an early stage.


[0]:
https://github.com/dhananjay92/phpmyadmin/commit/7bdad8efe33bed52d25e13ca1c064736c66fd022
[1]:
https://github.com/dhananjay92/phpmyadmin/commit/b137255bb617f7f00ac4b734d8b003a6ecd47128


Thanks,
Dhananjay Nakrani.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20140510/95870777/attachment.html>


More information about the Developers mailing list