Hello, my first post here so hope its helpful. Not seeing the fix when i uninstall and reinstall. The Clear button seems to be getting with the variable name action and value clear, rather than the variable being clear. Also there seems to be an s missing from file_put_contents.
Both of the following options fixed this for me, Not sure which is the best option although I think option 1 looks more in keeping with the rest of the code.
OPTION 1
--------
88c88,89
< if ($_GET['clear'])
---
if ($_POST['clear'])
93c94
< @file_put_content("/var/log/snort/alert", "");
---
@file_put_contents("/var/log/snort/alert", "");
306c307
< log files will be saved. <a href="/snort/snort_alerts.php?action=clear"><input name="delete" type="button"
---
log files will be saved. <input name="clear" type="submit"
308c309
< onclick="return confirm('Do you really want to remove all your logs ? All snort rule interfces may have to be restarted.')"></a>
---
onclick="return confirm('Do you really want to remove all your logs ? All snort rule interfces may have to be restarted.')">
OR OPTION 2
-----------
88c88
< if ($_GET['clear'])
---
if ($_GET['action'] == 'clear')
93c93
< @file_put_content("/var/log/snort/alert", "");
---
@file_put_contents("/var/log/snort/alert", "");