Testing the redsaver.cgi script
This Web page (and its source HTML file) will help you to verify that the redsaver.cgi script was copied to the correct directory and is working properly.
To synopsize the process, you must first open and modify the source HTML file for this page -- "redsaver_test.html". You can resave your changes to this same name or to another, different file name. Following this, reopen the modified HTML file and click each of the buttons, "Test 1" and "Test 2". If the script is working and your entries are correct, something good happens. Everyone goes out to Starbucks to celebrate.
- Open the HTML source file for this page.
- Search for the two instances of the following text: "CHANGE ME".
Each is associated with a separate test, and the test-specific coding can be identified by the comment tags that read "<!-- TEST 1 FORM TAGS -->" and "<!-- TEST 2 FORM TAGS -->
- Replace each instance of placeholder text with a test-specific URL that points to the location on the server where the redsaver is installed.
For example, if the cgi script was installed in this location:
The first placeholder text -- in Test 1 -- should be edited to incorporate the exact URL as shown in this example:
The second placeholder text -- in Test 2 -- should be edited to incorporate the exact URL as shown in this example:
|<FORM ACTION="http://www.yourserver.com/dir/cadviewer/redsaver.cgi" METHOD="POST">
Key code differences: Test 1 "POSTS" to this URL and Test 2 "GETS" from this URL.
Both Test 1 and 2 must work for the viewer to save the redlines correctly.
Note the text below represents the testscript.html These buttons do not work.
|<FORM ACTION="http://www.yourserver.com/dir/cadviewer/redsaver.cgi" METHOD="GET">
After changing the first CHANGE ME (as described above), click "Submit 1" button. The script should display a page with the terse but welcome message: "OK". If anything else appears -- message or dialog box -- the script is not working.
This test should create the file test1_file.red on your server at the location specified in the redsaver script. The contents should be 'test 1 information'. Note that Test 2 must also work for the viewer to save redlines.
After changing the second CHANGE ME (as described above), click "Submit 2" button.
Click the browser Back button once to reopen this page, then click "Submit 2" again.
This script should now display a Web page with the terse but welcome message: "OK". If anything else appears -- message or dialog box -- the script is not working.
This test should also create a file "test2_file.red" on your server at the location specified in the redsaver script. When opened with a text editor, the contents should read as follows:
test 2 information test 2 information
Note that Test 1 must also be successful, in order for the CADViewer to save redline files.
Troubleshooting a test failure
The most common problems that may prevent your cgi script from saving redlines include the following:
- FTP was used to copy the script to the server, but BINARY mode was used. Use ASCII mode only.
- FTP was used to copy the script but the file name case was mistakenly changed. For example: "redline_saver.cgi" was copied to the server as "redline_Saver.cgi" -- which prevents the CADViewer software from finding it.
- The directory where the script resides is not a directory that can run perl scripts. If you are the webmaster, be sure to check the location of the directory for perl scripts.
- Perl was not installed on your server. This problem is more common with Windows servers. Follow the instructions in LINK to obtain and install the needed Perl software.
- The permissions were not changed, or were modified erroneously. On Linux and UNIX, the directory and the script must be read and execute (chmod 660 redsaver.cgi). On Windows, the script directory must have execute permission.
- The destination directory for redline files does not have "write" permissions.
- If the above tests cause the browser to display the script file contents, the server is not executing the script. Make sure that the case of the URL text is correct.
- The script is pointing to an invalid directory.
If you get errors regarding the destination directory for the script, make sure that the path is correct. Remember that the path must reflect what the web server software will be expecting. For example, on a Windows server, your view of the CADViewer directory is
Whereas this directory is a mapped directory, so that the web server expects to find this directory at:
The script must contain the path c:\inetpub.... since the web server runs the script.
If you work through all these troubleshooting tasks and the script still does not work, please contact Tailor Made Software Ltd. Support. When reporting your problems, please be as specific as possible. Describe all error messages and the exact process that generated the error.