Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn php error reporting off in xampp?

Tags:

php

I just installed xampp, getting errors all over the place. Want to get rid of error handling. It's only annoying errors to do with my variables.

I'm not sure where to find php.ini, it doesn't exist in my C:\xampp\apache

like image 946
eveo Avatar asked Apr 15 '12 09:04

eveo


People also ask

How do I stop PHP error reporting?

To turn off or disable error reporting in PHP, set the value to zero. For example, use the code snippet: <?

How do I suppress a warning in PHP?

You can put an @ in front of your function call to suppress all error messages.

How can I see PHP errors in xampp?

To display all errors, including parsing errors, in xampp, make the following changes to the php. ini example file and restart the apache server. In the PHP. ini file, set the display errors directive to turn on.


1 Answers

Inside your php.ini make sure that you have display_errors to Off. From what I understand if you set display_errors to Off then the error_reporting directive doesn't need to change.

Example:

error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
display_errors = Off
like image 151
72lions Avatar answered Oct 17 '22 06:10

72lions