2

can server insert error reporting automaticly into database using php and mysql, if error_reporting = false and user not view the error in browser?i just need administrator get the error aotomaticly under user view.

and what script to get all error report?

  • Are you looking for a yes/no answer? If so answer is yes. Or is there something else? If there is, could you include in your question. Thanks – Trevor Dec 28 '15 at 06:42
  • @Trevor i have update my question, with what code to get the all error report. maybe any example. – riski maker Dec 28 '15 at 06:53
  • Error reports for php errors are logged automatically by the server in /var/log/error_log or similar (depending on OS). That is usually where administrator would look. – Trevor Dec 28 '15 at 06:56
  • 1
    Have a look at http://stackoverflow.com/questions/2911094/outputting-all-php-errors-to-database-not-error-log for the log to db. Then look at http://stackoverflow.com/questions/15949304/turn-off-display-error-php-ini for how to turn off display of error messages. – Trevor Dec 28 '15 at 07:16
  • @Trevor : thankyou very much :) – riski maker Dec 28 '15 at 07:28

1 Answers1

1

Hiding the error on the web browser - from Turn Off Display Error PHP.ini At top of php file add:

display_errors(false); 
log_errors(true); 

Logging to mysql see the accepted answer at Outputting all PHP errors to database not error_log

Community
  • 1
  • 1
Trevor
  • 1,111
  • 2
  • 18
  • 30