FoxWeb Error Logs

FoxWeb provides two error logging mechanisms, which can be invaluable tools for troubleshooting problems with your server and your scripts:

FoxWeb Error Log The FoxWeb Error Log (errors.dbf) contains information about errors that occurred during script execution and were trapped by the FoxWeb error handler.
Fwstart.log The file fwstart.log contains information about problems that occurred during service startup, and other errors that are not related to your FoxWeb script code.

The FoxWeb Error Log

FoxWeb's error handler returns informative error messages and saves information about the error in a table called errors.dbf. This information can be accessed using the Error Log Viewer in the FoxWeb Control Center or by manually opening the table in VFP. It is also accessible over the web via fwAdmin.fwx.

FoxWeb Error Log

The information saved in the error log consists of the following:

Date/Time
The date and time that the error occurred.

Script
The FoxWeb script in which the error occurred.

Error
The FoxPro error number and error message.

Line
The line number and the contents of the line that caused the error. Note that this may not be available if you are using the FoxWeb run-time DLL.

Previous
The calling procedure and program.

Memory Variables
This textbox contains all memory variables and their values at the time of the error.

Post Data
This textbox contains the names and values of any HTML form fields passed to FoxWeb by the browser.

Server Variables
This textbox contains all Server Variables and their values at the time of the error.

Tables
This memo field contains all open table and index files as well as the relations between them.

Environment
This memo field contains all the FoxPro environment at the time of the error including "SET" command values, the default directory, the path and any declared DLLs.

Tip: Double-clicking in the Memory Variables, Post Data, Server Variables, Tables, or Environment textboxes runs Notepad with the contents of the textbox. If you want you can customize the viewer being called, by adding a registry entry in the FoxWeb key. To do so run the Registry Editor (regedit.exe), expand the HKLM\Software\Aegis Group\FoxWeb\CurrentVersion key and add a string value called ErrorViewer, which points to the full path of your viewer.

Fwstart.log

The file fwstart.log is used to log startup errors, and other problems, not caused by trappable VFP errors. It should occasionally be checked to determine whether any of your scripts cause FoxWeb channels to become unresponsive. Fwstart.log can be opened directly in a text editor and is also accessible over the web via fwAdmin.fwx. Following are some sample entries from fwstart.log:

01/24/1999 18:40:39 Starting FoxWeb
01/28/1999 04:00:39 Killed Channel 2: /samples/customer
01/30/1999 17:28:53 Closing FoxWeb
01/30/1999 17:57:02 Starting FoxWeb

In the above example the second line indicates that channel 2 was killed by FoxWeb while it was running the program "/samples/customer." There are two reasons why this could have happened:

  1. The script took longer than the Script Timeout setting to execute. In this case you either need to optimize your code or increase the timeout.
  2. The program includes one of the illegal VFP commands, which causes the channel to hang.

© Aegis Group