Common Problems

Don't forget to occasionally check the error log and fwstart.log to make sure that your programs function as intended.

Installation and Startup

This section lists problems that occur during installation of FoxWeb, or while you are trying to start the system for the first time.

"No channels active" error

This error is usually caused by incorrect configuration in the FoxWeb Control Center. The readme file contains instructions on how to install and test FoxWeb. You should also read the FoxWeb Configuration and Operating the FoxWeb Server chapters of the FoxWeb documentation. Once FoxWeb is installed, you must start it, by using one of the methods in the Operating the FoxWeb Server topic. For now, configure FoxWeb to not run as a service, so that you can visually inspect the various components. Once FoxWeb is started, an icon should appear in the tray area of your task bar (usually the lower right area of your screen, next to the time display). Right-click on the icon and select the Show Status option. Are channels listed as having a "Waiting" status? If not, then something went wrong with channel initialization.

If your channels did not initialize properly, then you could examine the file fwstart.log in the FoxWeb directory. Are there any error messages that would indicate what the problem is?

If you have selected the "Use run-time DLL" option, then make sure that the appropriate run-time DLLs are installed on this system. For example, if you selected FoxWeb for VFP 7 during software installation, then you must have the VFP 7 run-time DLLs installed on the server according to the instructions in the VFP documentation. To determine whether the DLLs are installed properly, double-click on the fwserver.exe program. Nothing should happen, but a new entry should be added to fwstart.log: "Use FWSTART.PRG to start FoxWeb."

If you have not selected the "Use run-time DLL" option, then make sure that the VFP.EXE entry in the FoxWeb configuration points to the correct VFP executable. For example, if you selected FoxWeb for VFP 7 during software installation, then you must point this entry to VFP7.EXE in the folder where you installed VFP 7.

"404 Error"

If you get a 404 error accompanied with a message like "The requested URL was not found on this server", then, either the URL you are using is wrong, or FoxWeb is not set up properly to work with your Web server.

If you are using a script-mapped URL, then you should check your script mapping configuration in the Configuring your Web Server topic. Chances are that your server is not configured to pass URLs with the .fwx extension to FoxWeb.

If you are not using a script-mapped URL, but are rather referring directly to foxweb.exe, or foxweb.dll, then you must make sure that these two files are located in a directory configured for execute (CGI) access and that the URL you are using corresponds to this directory. For details on how to configure your server's CGI configuration refer to the Configuring your Web Server topic.

No program root has been configured for domain "xxx"

FoxWeb requires that you enter each host name or IP-address that will be used in URLs in the Virtual Hosts grid of the FoxWeb Control Center. For example, if your URL is http://www.foxweb.com/samples/myscript.fwx, you need to add a new row to the grid and enter "www.foxweb.com" in the Host Name column. If this is the only virtual host on your server, then you don't need to populate the Program Root column.

"Corrupt FoxWeb installation (2)" error

If you get this message after you start fwserver.exe then you've probably copied the FoxWeb files from another computer that had FoxWeb installed on it instead of installing FoxWeb from the its setup program. You should re-install FoxWeb.

The browser tries to download foxweb.exe or foxweb.dll

In some cases the web server tries to send foxweb.exe as "Application/octet-stream" instead of running it. There are several reasons why this might be happening:

"Can not find support Library" error

If you are getting this error while trying to run the FoxWeb Control Center, then it probably means that the VFP 6 Run-Time DLLs are not properly installed on your server. Regardless of which version of VFP you are running on your server, the VFP 6 Run-TIme DLLs must be installed in order to run the FoxWeb Control Center. You may download these DLLs from the download page of our Web site.

"Unable to open Semaphore 2! (1)" error

If you are running FoxWeb 2, then this error message should not be appearing. If you are getting this error message, then it means that you are actually calling an older version of foxweb.exe, which remained on your hard drive even after you installed version 2. You will need to locate and replace the old file with the new version.

Running Programs

This section lists problems that occur after FoxWeb has returned data at least once.

Hanging channels, or channels that get restarted often

The problem is probably related to your channels hanging because of one of the reasons outlined in the Illegal Commands chapter. The easiest way to isolate the offending code is to disable the "Run as Service" and "hide Channels" options in the FoxWeb configuration and then restart FoxWeb. You should now be able to see a separate icon for each channel in the task bar. Size and arrange the channel windows on your screen, so that they are all visible at the same time.

Call the offending script and then minimize your browser window, so that the channel windows are visible. Look for a dialog box, or other indication that a channel is waiting for user input. In most cases, the script tries to use a table that is not open, which causes the Open Table dialog to pop up, halting script execution.

If you can't find a visual indication of the problem, then you may need to trace through your script, using the techniques described in the Troubleshooting chapter.

Once you isolate and fix the problem, you can re-enable the above configuration options as necessary.

"FoxWeb Channel Stopped Responding" error

This error message means that a channel process exited, crashed, or was killed before it was finished with script execution. For example, you can cause this error by including a QUIT command in one of your scripts.

There are several culprits that may be causing this behavior. It is possible that VFP is crashing, or it is possible that one or more of your scripts contain one of the illegal commands, causing the channel to exit.

The technique to isolate the offending code is exactly the same as what is described in the "Hanging channels, or channels that get restarted often" item in this page.

"Session object has not been initialized" error

In order to use the Session or the Auth object you must first initialize the Session object, by calling the Session.InitVars method. This is done automatically if you have enabled the Session Support option.

"Could not Create POST Data File" error

For performance reasons, if the size of the POST data buffer is larger than 100 KB, FoxWeb stores it to a temporary file instead of sending it directly to the assigned channel. The location of this file is determined by the Temporary Directory setting, specified in the FoxWeb Control Center. To prevent this problem from happening you must make sure that the user that FoxWeb is running under has write privileges to the Temporary Directory location and that there is enough free disk space for the total size of all files being uploaded at the same time.

Disappearing session variables and cookies

Sessions are keyed off of a cookie called FW_SessionID. One important characteristic of cookies is that they will only be sent to the server that originally sent them to the browser. The way that browsers identify a server is by the server name in the URL. If the server name changes, then the cookies received by the browser in previous calls are not sent.

If two server identifiers point to the same server, but are not exactly the same (for example localhost and 127.0.0.1, or foxweb.com and www.foxweb.com), the browser will still regard them as different servers. This is why you should never use fully qualified URLs in your links and redirect statements, unless you are sending the user to a different server.

To avoid problems where the URL changes in the middle of a session you should never use fully qualified URLs in your scripts (URLs that contain the server name), unless you are pointing to a resource on a different server. If you are pointing to a local script or static file, then you should stick to absolute, or a relative URLs, as described in the Locating and Addressing Scripts chapter.

One way to diagnose such problems is to compare the Session ID before and after the redirection. If they are different, then the reason is most probably caused by a change in the server name.

Script output renders properly in a some browsers, but not others

Different browsers have varying levels of support for new HTML features, and even more importantly, different levels of tolerance for incorrect HTML syntax. If your code works under one browser, but does not display properly under another, then the problem is probably caused by mistakes in the HTML code returned by your scripts. You may want to test your code with one of the many available HTML validation programs and services.


© Aegis Group