Re: HashDos protection

From: Date: Fri, 27 Nov 2015 23:22:46 +0000
Subject: Re: HashDos protection
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-89473@lists.php.net to get a copy of this message
On 11/27/2015 2:21 PM, Yasuo Ohgaki wrote:
Hi Thomas, In practice, we wouldn't have problems with max number of collisions.
Is CLI going to be or can CLI be excluded from max collisions? After thinking about it for a long while, that's my only area of concern here. SAPI can (fatal) error to its heart's content and I'll find ways to live with it. But CLI needs stability guarantees. 'max_input_vars' didn't affect CLI. However, max collisions could negatively affect CLI because the change affects all arrays instead of just the superglobals. Real-world scenario: About once every 4 to 6 months I will write a script to load up a single PHP array with a few million records. Partly because I can and partly because I need to. On CLI, especially for my one-off quick-n-dirty scripts, I don't care how much CPU, RAM, and other resources are used nor how much time it takes to complete. I just care that the script finishes running successfully. If the script reads in a record and attempts to add it to the array, the proposed max collisions might trigger a fatal error if it hits the max collision limit for arrays. My experience is that CLI is silent about 50% of the time when it encounters a fatal error. So my script would drop back to the prompt after spending many minutes to hours loading the data, not having done any work, and not emit any error(s). I would think that it had completed successfully until I went to look at the results and the results I would be expecting to see wouldn't be there. I abuse PHP arrays. Especially on CLI. Sorry. -- Thomas Hruska CubicleSoft President I've got great, time saving software that you will find useful. http://cubiclesoft.com/

« previous php.internals (#89473) next »