|
ION Script User's Guide |
|
If your ION Script application is not working as expected, start by checking the simple things first. Following is a list of some of the more common mistakes that may be causing problems with your application:
Before checking problems related to ION Script and IDL, make sure you are able to communicate with your Web server. For example, if you are using the Apache Web Server, you can enter a URL such as http://localhost or http://hostname, where hostname is the hostname or Windows machine name of your computer. If your Web server is properly configured, you should receive a page that says "If you can see this, it means that the installation of the Apache web server software on this system was successful." Consult your Web server documentation to find out how to test your Web server.
Also, make sure you are able to run CGI programs on your Web server.
Using Microsoft IIS, the .exe extension must be included in URLs that point to executables. You will need to use ion-p.exe instead of ion-p in any URLs in your HTML and ION Script pages, and in the location field of your browser when requesting a URL.
If you get the message "ION Script: Error: Connection Failed" when you attempt to load an ION Script page, check the following:
.txt was not appended to the end of your .ion file. When you save a file in Notepad, such as myfile.ion, Notepad may automatically append .txt to the end, as in myfile.ion.txt. To avoid this, enclose the file in double quotation marks in the Save As dialog before saving the file.
cgi-bin directory?
.ionsrc file (UNIX). Remember that you cannot use the "+" symbol in the ION Search Path to indicate that all subdirectories of the specified directory should be searched. Therefore, each directory you want to be searched must be explicitly specified. See ION Search Path for more information.
.ionsrc file (UNIX). You must specify your Web server's fully qualified domain name and path to the CGI executables directory for your Web server. For example, the "Image Server URL" should look something like this:http://myhost.mydomain.com/cgi-bin/ion-i.exe
If, during the installation process, you left the field blank on the "Web Server Configuration" dialog in which you specify your Web server's fully qualified domain name, the installer will use your Windows machine name, or your hostname on UNIX.
If you get an HTTP error informing you that the file or script you requested cannot be found, such as "HTTP Error 404," but the URL you are using appears to be correct, check the following:
ion-i.exe and ion-p.exe (Windows) or ion-i, ion-I, ion-p, and ion-P (UNIX) are in your Web server's cgi-bin directory. If not, copy them from the /ION63/ion_script/cgi-bin subdirectory of your ION Script installation to your Web server's cgi-bin directory. On UNIX, make sure that the files ion-i, ion-I, ion-p, and ion-P have execute permission.
Note that these executables would not be copied to the cgi-bin directory if, during the installation process, you left the field blank on the "Web Server Configuration" dialog in which you specify the CGI executables directory.
.exe extension must be included in URLs that point to executables. You will need to use ion-p.exe instead of ion-p in any URLs in your HTML and ION Script pages, and in the location field of your browser when requesting a URL. If you get a page with an error message such as "License Error: ITT Visual Information Solutions license checkout failed", ION Script may not be properly licensed. View the licensing instructions in the Installing and Licensing IDL manual and make sure you have properly licensed ION.
| Note You can use the LM_LICENSE_FILE environment variable to point to where you have located your license file. The file does not have to be located in the default location ITT_DIR\license\license.dat, where ITT_DIR is the name of the main installation directory where you selected to install ION Java. |
<ION_BODY> <ION_VARIABLE NAME="$A"> </ION_BODY>
ION Script will return the following error:
Error: Mismatched tag pair: <ION_VARIABLE> ... </ION_BODY>
This error message indicates that you opened a tag called <ION_VARIABLE>, and ION Script found the next closing tag </ION_BODY>. This should alert you to the incorrect syntax for ION_VARIABLE (i.e., the proper way to close this tag is with /> rather than just >).
<ION_EVALUATE EXPR="$X + $Y"/>
.ionsrc file (UNIX). See DEBUG. This debugging file contains the exact code sent to IDL, as well as any errors reported by IDL.
print, "1 Elm Street"
Instead, you would need to use
print, '1 Elm Street'
See Single vs. Double Quotation Marks for more information.
.pro or .sav file containing the procedure or function you are calling is located in a directory specified in the IDL Search Path. On UNIX, also make sure all directories in the IDL Search Path have the proper read permissions. Set the IDL Search Path on the "Files tab" of the ION Script Configuration utility (Windows) or in the "Files" section of the .ionsrc file (UNIX).
mypage.ion with the following URL:http://myserver/cgi-bin/ion-p?page=mypage.ion&DATA=34
In mypage.ion, in order to access the DATA parameter, you must refer to it as $Form.DATA, not $DATA.
If your ION Script page contains an image from an <ION_IMAGE> tag, and a box is being displayed in place of the image you expect, check the following:
.ionsrc file (UNIX). This debugging file contains the exact code sent to IDL, as well as any errors reported by IDL.
.pro file, make sure the .pro file is in the IDL Search Path. The IDL Search Path can be set on the Files tab of the ION Script Configuration utility (Windows) or in the Files section of the .ionsrc file (UNIX).
IDL Online Help (March 06, 2007)