This is a discussion on is "ignore_repeated_errors" a little bit buggy? within the PHP Language forums, part of the PHP Programming Forums category; Hi, i would ask you about a little problem in my skript. I want to use the init-setting "...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. And on my WinXP - Xammp (It should work on this platform) i tried this. <?php phpinfo(); echo ini_get("ignore_repeated_errors"); ini_set("ignore_repeated_errors", "1"); echo ini_get("ignore_repeated_errors"); echo "<br>"; echo ini_get("ignore_repeated_source"); ini_set("ignore_repeated_source", "1"); echo ini_get("ignore_repeated_source"); phpinfo(); $counter = 0; while(!feof($handle)) { if(++$counter == 10) break; } ?> But, i got 10 times the same error - produced in the script. It seems to be wrong. Have anyone experience whit this iniset? Best regards Sebastian |
|
|||
|
On 1 Feb, 12:08, Sebastian Hopfe <s.ho...@gmx.net> wrote:
> 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. And on my WinXP - Xammp (It should work on this > platform) i tried this. > > <?php > > phpinfo(); > > echo ini_get("ignore_repeated_errors"); > ini_set("ignore_repeated_errors", "1"); > echo ini_get("ignore_repeated_errors"); > > echo "<br>"; > > echo ini_get("ignore_repeated_source"); > ini_set("ignore_repeated_source", "1"); > echo ini_get("ignore_repeated_source"); > > phpinfo(); > > $counter = 0; > > while(!feof($handle)) > { > if(++$counter == 10) > break; > } > > ?> > > But, i got 10 times the same error - produced in the script. It seems > to be wrong. Have anyone experience whit this iniset? > > Best regards > Sebastian According to the manual, ignore_repeated_errors stops the errors getting logged repeatedly. So are you seeing these errors in the log? |
|
|||
|
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 this is loged on the browserscreen and - if i set ini_set("log_errors", ini_get("error_reporting")); ini_set("display_errors", "Off"); ini_set("error_log", $_SERVER["DOCUMENT_ROOT"]."/system/ php_errors.log"); also in my php_errors.log |
|
|||
|
Okay, i have found the solution, and in this case its is a bug.
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. I will add this to the bugtracker. Br Sebastian |