Web Oriented Object Framework

User Guide (Version 0.5b4)

User Guide (Version 0.5b4)

Troubleshooting facilities

Woof! development mode

Set the run_mode configuration setting to development. Amongst other things, this will enable display of more detailed error information. For security reasons, only a limited amount of information is displayed in the browser in case of errors when this is set to production. Remember to set it back once you have resolved the issue.

Log files

Because there are multiple components involved, with potentially multiple log files for each, pertinent information may be scattered across several files.

Note that most components can be configured to log additional levels of detail. You may need to do this to get at the relevant information.

Woof! debug console

For issues related to page generation and display, the Woof! interactive console can be very useful. This shows both the HTTP headers and HTML content being generated while allowing for standard Tcl techniques for stepping through the code, examining variables, attaching filter methods for tracing and so on. For example, you can directly invoke commands for URL routing to verify that requests are being dispatched correctly.

CGI and SCGI connectors

Sometimes it is not clear whether a problem is caused by incorrect configuration of the Web server or the Woof! library or application code. The first step in these cases is to verify that the Web server is able to invoke the appropriate Woof! connector and passing it the correct information.

In the case of CGI, you can verify this by enabling the following code at the top of the cgi_server.tcl file which is generally installed in the public directory. This is shown below.

# For testing purposes, enable this fragment and just print out environment
if {0} {
   puts -nonewline "Content-type: text/html\r\n\r\n"
   foreach e [lsort [array names ::env]] {
       puts $e=$::env($e)<br>
   exit 0

This will print out the environment and exit without loading Woof!

NOTE Make sure to modify the correct file being invoked via CGI and not the lib/woof/webservers/cgi_server.tcl file which is only a template.

In the case of SCGI, instead of running the Woof! SCGI server, run the scripts/scgi_tester.tcl script. This will also print the environment passed by the Web server without loading Woof!

After doing the above, use the browser to connect to the Woof! URL of interest.

If you do not see a web page with the environment printed, the problem is likely to be that the Web server has not been configured properly for invoking the CGI / SCGI connector. Re-check you Web configuration settings.

If you see a page with the environment values being generated, the Web server is correctly configured to invoke the connector. However, there may still be an error in configuration that results in the incorrect values being passed to the connector. In particular, check that the value of the PATH_INFO environment variable corresponds to the controller method you expect to be invoked.

Browser tools

Finally, don't forget about the development tools that are available in all browsers. For example, F12 in IE or Ctrl-Shift-i in Chrome will bring up the developer tools pane. These can help with both page generation issues by allowing inspection of the DOM, CSS etc. as well connectivity and protocol related issues, for example incorrect headers cookies etc. They also allow the browser to be set up for development, for example by disabling the browser cache.