Make a good copy of PHP_errors.log for crash reporter

Forum report https://forum.pfsense.org/index.php/topic,72877.0.html
This commit is contained in:
Phil Davis 2014-02-19 23:56:03 -08:00
parent d3515e02d5
commit 38cb3c392d

View File

@ -105,7 +105,7 @@ exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors);
mkdir("/var/crash", 0750, true);
@file_put_contents("/var/crash/crashreport_header.txt", $crash_report_header);
if(file_exists("/tmp/PHP_errors.log"))
copy("/tmp/PHP_errors.log", "/var/crash/");
copy("/tmp/PHP_errors.log", "/var/crash/PHP_errors.log");
exec("/usr/bin/gzip /var/crash/*");
$files_to_upload = glob("/var/crash/*");
echo "<p/>";