mrj Posted July 10, 2018 Posted July 10, 2018 Hi,I am trying to turn off errors like warnings, notices and so on. But It's seems like I am unable to turn of error reporting.I even tried to turn off all warnings using error_reporting(0)I hope to get your help soon.
wolstech Posted July 10, 2018 Posted July 10, 2018 error_reporting(0); should definitely work. Are you sure your software doesn't have logic in it somewhere that turns it back on?
mrj Posted July 10, 2018 Author Posted July 10, 2018 I am using usespice software. https://userspice.com. I am not sure if that can cause a problem. Okay, I am testing this on a test php file, and then I will post update here.
mrj Posted July 10, 2018 Author Posted July 10, 2018 hi wolstech,I just checked on test file.Code:<?php error_reporting(0); $ggs->hf = 'bfdnb' ?>Result:Parse error: syntax error, unexpected end of file in /home1/mrj/public_html/test.php on line 3
mrj Posted July 10, 2018 Author Posted July 10, 2018 I did write in wrong syntax. But it's not supposed to show errors. As you can see the file is a standalone file. Please help me.
wolstech Posted July 10, 2018 Posted July 10, 2018 Error reporting can't be disabled for syntax errors. It works just fine: With it off https://www.raxsoft.com/temp/no_error.php and on https://www.raxsoft.com/temp/error.php no_error.php: <?php error_reporting(0); mysql_fetch_array($null); ?> error.php <?php mysql_fetch_array($null); ?> More than likely the software you're using hijacks the error reporting state and tries to control it on its own. You'll need to either check for an option in the software (usually hiding in a config file), or go through the source code of the software you're using and comment out any error_reporting options that it tries to set.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now