DiscusWare, LLC.
Download Purchase Contact Us
Home
Support Home Documentation Knowledge Base Support Forums Support Request Advanced Services
Getting debugging information if a server doesn't provide an error log

Sample code that you can insert into CGI scripts in order to create your own software error log, and a description of the Discus 4.10 internal error log.
Support Site Search
 


Discus 4.10 Error Log

Discus 4.10 stores an error log in the discus_admin_xxxxx/data/errorlog directory. The file entield "errorlog" is the equivalent of what would be logged in the server's error log. The other files in that directory (e.g. "1153427697-1366") are for debugging, as they record exact form parameters, settings, and environment at the time of the failure.

If asked by DiscusWare for the error log, first consult the "errorlog" file and look there for the message. DiscusWare may then ask you for a specific debugging file so that additional assistance can be provided.

Discus 4.0 and Below

Most web hosts are wise enough to provide an error log to their customers, to assist with script debugging and analyzing other problems that come up on web sites. Sometimes an error log is not provided and a web host is unwilling to turn on an error log for the customer. In these cases, the following modification may work to provide an error log.

The following modification is UNSUPPORTED, meaning that if you do it and it breaks your board, we cannot help you. Be sure to make a backup copy of any files that you edit, so in case something goes wrong, you can restore the original to un-break things. (Requests for support concerning this topic will be silently ignored.)

This modification requires Discus 4.0 or higher, and it requires that the board be properly working. Insert the following green code into the config.cgi script, right under the line that reads:

use vars qw($GLOBAL_OPTIONS $PARAMS $DCONF);

use CGI::Carp qw(carpout);
if (discus_conf() =~ m|^(.*)/|) {
   if (open(LOG, ">>$1/data/cgi-error.log")) {
      carpout(*LOG);
   }
}

Now, any internal server errors occurring when executing your code will be logged to a file called "cgi-error.log" within the "data" directory of your Discus administration directory.


Download Purchase Contact Us
Privacy Policy
Copyright © 2005, DiscusWare, LLC, All Rights Reserved