Re: ignore_repeated_errors has no effect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Just a precision, I don't want to modify the user's code, I would like
to configure my server properly so it does not happen again even if
another user makes a similar mistake.

Thanks,

Simon

On Sun, Nov 7, 2010 at 09:02, Andre Polykanine <andre@xxxxxxxx> wrote:
> Hello Simon,
>
> Just modify the While statement:
> while(strlen(trim($ligne))==0 && file_exists($fic) && !feof($fic))
>
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile
> Twitter: http://twitter.com/m_elensule
> Facebook: http://facebook.com/menelion
>
> ----- Original message -----
> From: Simon Marchi <simon.marchi@xxxxxxxxxx>
> To: php-general@xxxxxxxxxxxxx <php-general@xxxxxxxxxxxxx>
> Date: Sunday, November 7, 2010, 11:03:40 AM
> Subject:  ignore_repeated_errors has no effect
>
> Hi !
> My problem is the following. Due to crappy code by one of my users,
> PHP entered an infinite loop generating an error, causing very high
> load on the server and gigantic log files.
> The lines at fault were the following
>
> while(strlen(trim($ligne))==0 && !feof($fic))
>     $ligne = fgets($fic,1024);
>
> where $fic is not a valid file resource. The generated error is an
> almost infinite amount of:
>
> [Fri Nov 05 03:28:33 2010] [error] [client 66.249.65.124] PHP Warning:
>  feof() expects parameter 1 to be resource, boolean given in
> /home/comites/interne/polymond/nova_html/polysuisse2004/photo/gallerie.php
> on line 52
> [Fri Nov 05 03:28:33 2010] [error] [client 66.249.65.124] PHP Warning:
>  fgets() expects parameter 1 to be resource, boolean given in
> /home/comites/interne/polymond/nova_html/polysuisse2004/photo/gallerie.php
> on line 53
>
> However, I did set ignore_repeated_errors to On, as well as
> ignore_repeated_source. I checked that the settings is effective in
> phpinfo().
>
> Does anybody have an idea why I still get these repeated errors ?
>
> Thanks !
>
> Simon
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux