Lawrence D’Oliveiro <l…@nz.invalid> writes:
> Oregonian Haruspex wrote:
>> Pretty much every router out there uses PHP for its web management
>> console.
>
> One reason why this surprises me, besides the general sadness of PHP,
Historically its security reputation was abysmal[1], and based on recent
events it seems that this remains justified. I think any organization
using it would benefit from reviewing their technology selection
processes, and ensuring sure their security team is adequately empowered
to say “no” and have it stick.
[1] https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
> To emulate this on a web-based interface, you need to ability to
>
> 1) start a ping sequence going out
> 2) keep dynamically updating the web page as responses come back (or
> non-responses get marked as timeouts)
> 3) stop the sequence at any time.
>
> This is hard to do with the basic HTTP request/response paradigm.
> So what you get instead is something clunky like
>
> 1) Enter number of pings desired
> 2) Click Start button
> 3) Stare at a frozen page while waiting for the ping sequence to complete
> and actually update the page
> 4) View results.
>
> But it is quite easy to make things more interactive if you can add
> WebSocket connections to the mix. But that requires your
> web-management app to be running its own event loop, and the
> traditional mod_php (or PHP-FPM, if you prefer) model doesn’t allow
> this sort of flexibility.
No need to add websockets to the mix, browsers are quite happy to render
slow-arriving responses HTTP incrementally. I can’t speak for PHP but
the clunky output you describe is not a necessary consequence of the
HTTP design.