RE: [PHP] ignore_repeated_errors has no effect
-Original Message- From: thunder...@gmail.com [mailto:thunder...@gmail.com] On Behalf Of Simon Marchi Sent: Sunday, November 07, 2010 8:45 AM To: Andre Polykanine; php-general@lists.php.net Subject: Re: [PHP] ignore_repeated_errors has no effect 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 Simon, This I find next to impossible to achieve. As I figure it like this, imagine that your server is a perfectly fine tuned sports car. The driver (the user and his/her app) is an experienced, lack of racing training, or doesn't understand the concept of racing and decides to push the car to limit. I'd say that the car will break down or end up in a big crash 99.9% of the time. Thus, if wish you to maintain high availability as a provider, I strongly suggest you to inform the user to fix his/her app. As for changing that setting of ignore repeated errors, you're just letting buggy apps slide by, which can be both a stability and security issue, IMHO. Regards, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ignore_repeated_errors has no effect
-Original Message- From: Tommy Pham [mailto:tommy...@gmail.com] Sent: Monday, November 08, 2010 4:25 AM To: 'Simon Marchi'; 'Andre Polykanine'; 'php-general@lists.php.net' Subject: RE: [PHP] ignore_repeated_errors has no effect -Original Message- From: thunder...@gmail.com [mailto:thunder...@gmail.com] On Behalf Of Simon Marchi Sent: Sunday, November 07, 2010 8:45 AM To: Andre Polykanine; php-general@lists.php.net Subject: Re: [PHP] ignore_repeated_errors has no effect 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 Simon, This I find next to impossible to achieve. As I figure it like this, imagine that your server is a perfectly fine tuned sports car. The driver (the user and his/her app) is an experienced, lack of racing training, or doesn't understand the concept of racing and decides to push the car to limit. I'd say that the car will break down or end up in a big crash 99.9% of the time. Thus, if wish you to maintain high availability as a provider, I strongly suggest you to inform the user to fix his/her app. As for changing that setting of ignore repeated errors, you're just letting buggy apps slide by, which can be both a stability and security issue, IMHO. Regards, Tommy Sorry, that above should read as 'inexperienced' instead of 'experience'... I've been up late too long :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ignore_repeated_errors has no effect
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 an...@oire.org 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.mar...@polymtl.ca To: php-general@lists.php.net php-general@lists.php.net Date: Sunday, November 7, 2010, 11:03:40 AM Subject: [PHP] 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