php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44015 ignore_repeated_source uses from error history
Submitted: 2008-02-01 13:25 UTC Modified: 2008-04-03 14:36 UTC
From: s dot hopfe at cc-carconsult dot de Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.5 OS: *
Private report: No CVE-ID: None
 [2008-02-01 13:25 UTC] s dot hopfe at cc-carconsult dot de
Description:
------------
Hi, 

i would ask you about a little problem in my skript. I want to use the init-setting "ignore_repeated_errors" - but it does not  things 
explained in the documentation. For testing this feature, i had wrote a little testscript. (See in Repoduce Code) And on my WinXP - Xammp (It should work on this platform) i tried this. 

But, i got 10 times the same error - produced in the script. It seems to be wrong. 

After testing, we add the following command in the top of the file: 

error_reporting(E_ALL); 

And we saw that there are NOTICE between the Warnings. So it seem to 
be a  different between the displayed and the real errors. But wenn 
this functions is called "ignore_repeated_errors" then the compiler 
should inspect the displayed errors. Because, this function should 
help to avert the spamming by same errors into the logfile. 







Reproduce code:
---------------
<?php
  
  ini_set("ignore_repeated_errors", "1");
  ini_set("ignore_repeated_source", "1");

  $counter = 0;
  while(!feof($handle))
  {
    if(++$counter == 10) break;
  }

  error_reporting(E_ALL);
  $counter = 0;
  while(!feof($handle))
  {
    if(++$counter == 10) break;
  }

?>

Expected result:
----------------
I want to See one Warning

Actual result:
--------------
I see all 10 warnings - because the notice are hide

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-01 22:59 UTC] jani@php.net
What _exactly_ is output?
 [2008-02-04 10:36 UTC] s dot hopfe at cc-carconsult dot de
It shows exactly follow errors

Warning: feof(): supplied argument is not a valid stream resource in C: 
\Programme\***\htdocs\did\err_check.php on line 21 

Warning: feof(): supplied argument is not a valid stream resource in C: 
\Programme\***l\htdocs\did\err_check.php on line 21 


Warning: feof(): supplied argument is not a valid stream resource in C: 
\Programme\***\htdocs\did\err_check.php on line 21 


Warning: feof(): supplied argument is not a valid stream resource in C: 
\Programme\***\htdocs\did\err_check.php on line 21 


Warning: feof(): supplied argument is not a valid stream resource in C: 
\Programme\***\htdocs\did\err_check.php on line 21 


Warning: feof(): supplied argument is not a valid stream resource in C: 
\Programme\***\htdocs\did\err_check.php on line 21 


Warning: feof(): supplied argument is not a valid stream resource in C: 
\Programme\***\htdocs\did\err_check.php on line 21 


Warning: feof(): supplied argument is not a valid stream resource in C: 
\Programme\***\htdocs\did\err_check.php on line 21 


Warning: feof(): supplied argument is not a valid stream resource in C: 
\Programme\***\htdocs\did\err_check.php on line 21 


Warning: feof(): supplied argument is not a valid stream resource in C: 
\Programme\***\htdocs\did\err_check.php on line 21 


But i only want to see Warnings and not the notice. When you enable Notive you see the notices between the warnings. please check my reproduce code. try it with only Warnings, and than with all errors.
 [2008-04-03 14:36 UTC] jani@php.net
This is not any bug. It does not matter whether the error is displayed or not, it's still and error. The ini option would be named 'ignore_displayed..' if it was such. You should _always_ log errors anyways, that's for what these settings are meant for.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 06 11:01:34 2024 UTC