is "ignore_repeated_errors" a little bit buggy?
is "ignore_repeated_errors" a little bit buggy?
am 01.02.2008 13:08:09 von nusphere
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.
phpinfo();
echo ini_get("ignore_repeated_errors");
ini_set("ignore_repeated_errors", "1");
echo ini_get("ignore_repeated_errors");
echo "
";
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
Re: is "ignore_repeated_errors" a little bit buggy?
am 01.02.2008 13:23:17 von Captain Paralytic
On 1 Feb, 12:08, Sebastian Hopfe 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.
>
>
>
> phpinfo();
>
> echo ini_get("ignore_repeated_errors");
> ini_set("ignore_repeated_errors", "1");
> echo ini_get("ignore_repeated_errors");
>
> echo "
";
>
> 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?
Re: is "ignore_repeated_errors" a little bit buggy?
am 01.02.2008 13:34:16 von nusphere
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
Re: is "ignore_repeated_errors" a little bit buggy?
am 01.02.2008 14:09:03 von nusphere
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