Jump to content

Errors are not turning off


mrj

Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...