Project

General

Profile

Bug #2678

disk full because of big /tmp/PHP_errors.log

Added by Thomas NOEL about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
11/12/2012
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.0.1
Affected Architecture:

Description

I have a big /tmp/PHP_errors.log on my pfSense 2.0 machine, with line like :

[12-Nov-2012 11:40:17] PHP Warning:  Cannot modify header information - headers already sent by (output started at /etc/inc/authgui.inc:201) in /usr/local/www/guiconfig.inc on line 47
[12-Nov-2012 11:40:17] PHP Warning:  Cannot modify header information - headers already sent by (output started at /etc/inc/authgui.inc:201) in /usr/local/www/guiconfig.inc on line 48
[12-Nov-2012 11:40:17] PHP Warning:  Cannot modify header information - headers already sent by (output started at /etc/inc/authgui.inc:201) in /usr/local/www/guiconfig.inc on line 49
[12-Nov-2012 11:40:17] PHP Warning:  Cannot modify header information - headers already sent by (output started at /etc/inc/authgui.inc:201) in /usr/local/www/guiconfig.inc on line 50
[12-Nov-2012 11:40:17] PHP Warning:  Cannot modify header information - headers already sent by (output started at /etc/inc/authgui.inc:201) in /usr/local/www/guiconfig.inc on line 51

I propose this patch :

--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -32,6 +32,15 @@
        pfSense_MODULE: base
 */

+/* make sure nothing is cached */
+if (!$omit_nocacheheaders) {
+       header("Expires: 0");
+       header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+       header("Cache-Control: no-store, no-cache, must-revalidate");
+       header("Cache-Control: post-check=0, pre-check=0", false);
+       header("Pragma: no-cache");
+}
+
 /* Include authentication routines */
 /* THIS MUST BE ABOVE ALL OTHER CODE */
 if(!$nocsrf) {
@@ -44,15 +53,6 @@ if(!$nocsrf) {
 }
 require_once("authgui.inc");

-/* make sure nothing is cached */
-if (!$omit_nocacheheaders) {
-       header("Expires: 0");
-       header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
-       header("Cache-Control: no-store, no-cache, must-revalidate");
-       header("Cache-Control: post-check=0, pre-check=0", false);
-       header("Pragma: no-cache");
-}
-
 /* parse the configuration and include all configuration functions */
 require_once("functions.inc");

Associated revisions

Revision 9c59f962 (diff)
Added by Ermal Luçi about 7 years ago

Resolves #2678. Merge patch suggedted to stop warnings on PHP_errors.log

Revision a3882612 (diff)
Added by Ermal Luçi about 7 years ago

Resolves #2678. Merge patch suggedted to stop warnings on PHP_errors.log

History

#1 Updated by Ermal Luçi about 7 years ago

  • Status changed from New to Resolved

Merged, thx for the report.

#2 Updated by Thomas NOEL about 7 years ago

Thanks ! Can you "cherry-pick" the patch on RELENG_2_0 ?

Also available in: Atom PDF