Debugging Gsharp Web Edition

This page describes how to test and debug your web server configuration. If the standard examples are working and you are looking for advice on debugging your own scripts see Debugging Scripts in the GsharpWE User Guide.

Getting the Gsharp Web Edition Examples to Work

  1. Carefully follow all the instructions in Configuring your Web Server
  2. [On UNIX] Make sure the scripts have execute permission. [On Windows] Make sure that double clicking on a .gsw files runs the script using the Gsharp Web Edition.
  3. Make sure that the directory containing your scripts has been registered with your web server as containing CGI Scripts. Do other cgi-bin scripts work in this directory? See your web server documentation for further details.
  4. Execute the example gs_gallery.gsw in a shell and check it produces HTML output (see Debugging Scripts for details of how to run a script in a shell). If it doesn't you may need to set some environment variables. Try setting the following in turn until the script runs:
    • UNIDIR - set to the directory of your installation.
    • LM_LICENSE_FILE (UNIX only) - set to your license file, normally $UNIDIR/base/license.dat

    Set any required environment variables in the configuration scripts of your web server or in your operating system. See Configuring your Web Server for more details.

  5. Check the server error log for errors. See your web server documentation to find the location of your web server error log.
  6. Contact AVS Support

The examples work but with no images:

As part of the configuration process you should have created a directory for containing image files. This directory must be writable by CGI scripts and must be added to your web server as a directory which contains documents that can be requested.

The physical location of this directory should be available to Gsharp in the environment variable GsharpTmpFilesActualDir. The name which this directory is know to the web server should be available in the environment variable GsharpTmpFilesWebDir. The physical directory containing the Gsharp example scripts should be made available in the environment variable GsharpWEcgi-binDir.

  1. Make sure that all of the required environment variables are being set correctly - GsharpTmpFilesWebDir, GsharpTmpFilesActualDir and GsharpWEcgi-binDir. Run the GsharpWE debug script to see what they are set to: http://yourserver/Gsharp-bin/gs_debug.gsw.
  2. Make sure that Gsharp can save images into getenv("GsharpTmpFilesActualDir")
  3. Make sure your web browser can display images in GsharpTmpFilesWebDir.
  4. Contact AVS Support