savannah-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-cvs] [235] FrontEndDebuggingTips: new page


From: assafgordon
Subject: [Savannah-cvs] [235] FrontEndDebuggingTips: new page
Date: Mon, 26 Sep 2016 00:36:11 +0000 (UTC)

Revision: 235
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=administration&revision=235
Author:   agn
Date:     2016-09-26 00:36:08 +0000 (Mon, 26 Sep 2016)
Log Message:
-----------
FrontEndDebuggingTips: new page

Modified Paths:
--------------
    trunk/sviki/RunningSavaneLocally.mdwn

Added Paths:
-----------
    trunk/sviki/FrontEndDebuggingTips.mwdn

Added: trunk/sviki/FrontEndDebuggingTips.mwdn
===================================================================
--- trunk/sviki/FrontEndDebuggingTips.mwdn                              (rev 0)
+++ trunk/sviki/FrontEndDebuggingTips.mwdn      2016-09-26 00:36:08 UTC (rev 
235)
@@ -0,0 +1,98 @@
+FrontEnd Debugging Tips
+=======================
+
+This page details tips about debugging savannah's frontend (PHP code and such).
+
+It is *hhighly* recommended to debug/develop new features on a
+dedicated [[FrontEndDevelopmentSite]] or when [[RunningSavaneLocally]].
+Avoid meddling with the real public website as much as possible.
+
+
+PHP debugging
+-------------
+
+### Showing PHP messages + SQL statements on the web-browser
+
+In the `savane.conf.php` file, set (or uncomment) `$sys_debug_on=true`.
+
+This option will add to the bottom of every rendered HTML page the
+list of all SQL commands with source code information, and all
+POST/GET/COOKIES values.
+
+Call `util_debug("hello world");` to print additional messages
+at the bottom of the rendered HTML page (e.g. 'debug-by-printf').
+
+To print a variable, call `util_debug(print_r($VAR,TRUE));`.
+
+
+### Print messages to apache's log
+
+In the php code, call `error_log("hello world");` to send the message
+to apache's log (note: it will be the error log or php log, depending
+on your configuration. See details below).
+
+To print a variable, call `error_log(print_r($VAR,TRUE));`.
+
+
+Dedicated Development Site
+--------------------------
+
+For websites setup according to [[FrontEndDevelopmentSite]],
+the relevant locations are:
+
+* access log: `/home/[USER]/savannah/var/[USER].access.log`.
+* error log (STDERR): `/home/[USER]/savannah/var/[USER].error.log`.
+* PHP error messages: `/home/[USER]/savannah/var/[USER].php-error.log`.
+* project registration submissions:
+  `/home/[USER]/savannah/var/www/submissions_uploads`.
+* tracker file attachments:
+  `/home/[USER]/savannah/var/lib/savane/trackers_attachments`.
+* mail logs: `/var/log/mail.log` (Same as the real system, see [[MailSystem]]).
+  *NOTE* about emails sent from development sites:
+
+  1. emails are sent just like fron the public website, and will
+     reach the savnnah mailing-lists and all their subscribers - don't
+     spam unnecessarily.
+  2. emails will originate from
+     address@hidden Because all savannah's
+     mailing lists are moderated - The first time emails are sent
+     they will not be delivered or archived on lists.gnu.org until
+     they are approved by a human.
+     Be aware of this If you are troubleshooting email-related
+     issues (or updating email message contents)
+
+
+* cron jobs: (FIXME)
+
+
+Local Savannah Site
+-------------------
+
+When [[RunningSavaneLocally]], the following are used:
+
+FIXME.
+
+* access log:
+* error log (STDERR):
+* PHP error messages:
+* project registration submissions:
+* tracker file attachments:
+* mail logs: (not sent? depending on local PHP settings?)
+* cron jobs: (no cron jobs)
+
+
+
+Public website
+--------------
+
+The following files/directories are used by the public
+website (which serves <https://frontend0.savannah.gnu.org>,
+and soon <https://savannah.gnu.org> when migration is completed).
+
+* access log: `/var/log/apache/access.log`.
+* error log (STDERR): `/var/log/apache/error.log` (FIXME: verify).
+* PHP error messages: same as error log (no separate PHP log for public 
website).
+* project registration submissions: `/var/www/submissions_uploads`.
+* tracker file attachments: `/var/lib/savane/trackers_attachments`.
+* mail logs: `/var/log/mail.log` (see [[MailSystem]]).
+* cron jobs: (FIXME)

Modified: trunk/sviki/RunningSavaneLocally.mdwn
===================================================================
--- trunk/sviki/RunningSavaneLocally.mdwn       2016-09-25 05:04:04 UTC (rev 
234)
+++ trunk/sviki/RunningSavaneLocally.mdwn       2016-09-26 00:36:08 UTC (rev 
235)
@@ -187,25 +187,5 @@
     <address@hidden> and we'll try to help you
     troubleshoot this error.
 
-## PHP Debugging
 
-1. In the `./local/savane/.savane.conf.php` file, set (or uncomment)
-    `$sys_debug_on=true`.  
-    This option will add to the bottom of every rendered HTML page the
-    list of all SQL commands with source code information,
-    and all POST/GET/COOKIES values.  
-
-    In the code you want to debug, call `util_debug("hello world");` to add
-    this message to the debug information at the bottom of the page.
-
-    To print a variable, call `util_debug(print_r($VAR,TRUE));`.
-
-2. The apache error log `./local/apache2/logs/error_log` will contain the
-    `STDERR` from PHP.
-
-    In the php code, call `error_log("hello world");` to send this
-    message to STDERR.
-
-    To print a variable, call `error_log(print_r($VAR,TRUE));`.
-
-    Then monitor the error log with `tail -f ./local/apache2/logs/error_log`.
+See [[FrontEndDebuggingTips]] for log files and PHP debugging tips.
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]