Say I have two PHP scripts. The first one looks like this:
<?php
session_name('zzz');
session_start();
sleep(10);
The second one looks like this:
<?php
session_name('zzz');
$start = microtime(true);
session_start();
$elapsed = microtime(true) - $start;
echo "took $elapsed seconds";
If I visit the first script with a browser and then visit the second script right after the second script will take 10 seconds to run just like the first script. If I visit the first script and hit stop 0.5 seconds into it's loading the second script will still take ~10 seconds to load.
So if "Stop" doesn't reliably stop time consuming PHP scripts (such that the second script in the above example returns it's output instantly) what will? I guess I could do ps aux | grep apache2
on the CLI and then kill every apache2 proc but then that might kill the webserver all together and idk that I'd want to do that.
Any ideas?