Create Files to Upload to Server
SSI Web survey authors install SSI Web on their local PC. When they are finished creating a survey, they click Field | Prepare for Web Upload.
Prepare for Web Upload assembles the files required to run the web survey. It places these files in a "Web Upload" folder inside the study folder. These files are later uploaded to the web server by using FTP software.
SSI Web uses scripts written in the Perl programming language to run web-based surveys. A Perl interpreter must be installed on your web server for SSI Web surveys to work correctly.
Active State provides a free version of their ActivePerl interpreter at http://www.activestate.com/activeperl/downloads.
When installing ActivePerl, we recommend accepting all of the defaults.
Make sure the following options are checked:
Perl should be added to the PATH environment variable, a Perl file extension association should be made, and the IIS script mapping for *.pl should be created.
Although instructions have been provided for ActivePerl, SSI Web can utilize any available Perl interpreter. Please consult your System Administrator to make sure a Perl interpreter is available.
Using IIS 7.0 (Windows Server 2008)
Before you begin make sure to complete the Installing Perl section above.
Next, create a folder that serves as your study root in the wwwroot folder. The main folder for web pages under IIS is C:\inetpub\wwwroot (although this is the default location, your system administrator may change it).
For example, if the SSI Web study were called "stu1", a folder could be created in the wwwroot folder named "stu1".
Microsoft's Web Server IIS (Internet Information Services) should have the Role Service "CGI" installed. You can double check that by going to Control Panel, Programs and Features, Turn Windows features on or off. This will open the Server Manager window. Scroll down to Roles Summary and click the Web Server (IIS) link. Ensure that CGI is installed.
Open the IIS Manager, located in the Administrative Tools folder of the Control Panel. You now need to either setup a new website or add a new virtual directory and point it to your study in C:\inetpub\wwwroot.
A new virtual directory is created by right clicking a website and selecting "Add Virtual Directory".
You then need to specify an alias for the virtual directory and where the actual files for that directory are located on the hard drive. The virtual directory points
Next, highlight the virtual directory and double click on Handler Mappings.
Click the Add Script Map link on the right side column under Actions.
The Add Script Map dialog box will appear.
Enter the following values:
- Request path: *.pl
- Executable: C:\Perl\bin\perl.exe "%s" %s
If perl is installed in a different location enter that path. Be sure to add the "%s" %s at the end of the path.
- Name: Perl
After clicking OK you should see the message below (if not click Request Restrictions in the above dialog first and then click OK).
Click "Yes" on the above dialog. You want to "Allow" this entry in the ISAPI and CGI Restriction list.
NOTE: Make sure to do the above steps for *.cgi files as well. This is an important security step.
SSI Web needs permission to read, write, and delete within the "admin" and "data" folders. To allow this in IIS right click on your virtual directory (or website) and go to Edit Permissions. Click on the Security tab and click Edit. Highlight "Users (SERVER2008\Users)" and give them the "Modify" permission.
Configuration of the web server is now complete and ready for testing. Make sure to test taking the survey from the beginning to the end. Also log into the Admin Module and make sure you can download data etc. Be aware with the many different server configurations, these instructions may vary slightly. Consult your System Administrator for assistance.
Uploading Files and Folders
The files and folders created in the Web Upload folder (see: Create Files to Upload to Server) now must be set up and configured on your web server. The following table describes the contents of the Web Upload folder.
|File / Directory||Description|
|STUDYNAMElogin.html||Login page. Entry point for respondents.|
|STUDYNAMEadmin.html||Admin Module login page. Entry point for study administrators.|
|admin||Folder or directory.|
|STUDYNAMEqst.cgi||Main web questionnaire file.|
|STUDYNAMEpath.cgi||Contains server path information.|
|STUDYNAMEpacc.cgi (see security section below)||Contains Admin Module passwords.|
|STUDYNAMEpwds.cgi||Contains respondent usernames, passwords, and any merged data.|
|* STUDYNAME_CBC[exerciseID]_[designID].cgi||Design file for CBC/Web studies.|
|** STUDYNAME_MXD[exerciseID]_[designID].cgi||Desgin file for MaxDiff/Web studies.|
|cgi-bin||Folder or directory that contains all of the Perl files.|
|graphics||Folder or directory that contains all the graphics in your study.|
|data||Folder or directory that will contain respondent data.|
* Only for CBC/Web studies
** Only for MaxDiff/Web studies
The default configuration has a cgi-bin folder for each study. Some ISPs do not allow this. For configurations other than the default, see the Configuring a Common CGI-BIN for All Studies section below.
The contents of the Web Upload folder are usually uploaded to the web server via FTP (File Transfer Protocol). FTP is a method which transfers (uploads) files from your local PC to the web server on the Internet. To FTP your files, you need an FTP program. We recommend WS_FTP (http://www.ipswitch.com)
When uploading files to the web server it is essential that you upload in binary mode. Binary mode ensures that the file is not changed in any way during the upload process. The size (number of bytes) of all files should be the same on the web server as they are on your local PC.
At this point, if you have uploaded the files and folders and set permissions correctly, your survey should be working. Go to STUDYNAMElogin.html on your web site and test your survey making sure the study behaves as expected and that it is saving data. Remember to log into the Administrative Module through STUDYNAMEadmin.html to see your results and download your data.
If you are getting errors see the Common Mistakes section below.
You are responsible for securing your web server.
Here are a few items to consider:
Make sure that *.cgi files (including password and data files) are not visible to the world. The server needs to be configured so that it will not permit a browser to display the contents of *.cgi files. One way to do this is to configure your server such that *.cgi files are treated as cgi-scripts. Make sure that you cannot use a browser to open the file containing your Admin Module passwords (STUDYNApacc.cgi). For example, you should not be able to view the contents of the STUDYNAMEpacc.cgi file if you paste an address similar to the one below (using the URL specific to your study) into your browser's address bar:
If attempting to access the *.cgi file causes an error to be posted to the screen, then this lets you know that the *.cgi files are configured correctly.
The server needs to be configured so that server directory listings are not visible to the world. Make sure that if you paste the URL to your "admin" folder into your browser's address bar, you are not able to see any file names. For example (using the URL specific to your study):
Configuring a Common CGI-BIN for All Studies
The default configuration of SSI Web has a separate cgi-bin directory inside each study root directory. Some web server configurations and ISPs do not allow this. They have a specific location where all CGI scripts must reside in order to execute. The following steps outline how to make SSI Web work with this alternate configuration:
Upload all of the SSI Web Perl files (*.pl) to the location where they have permission to execute (the "common cgi-bin").
In the authoring interface of SSI Web, go to Compose | Survey Settings | Server Settings. Modify the default paths to account for the new location of the Perl scripts. The following list describes the Server Directory Paths that need to be modified:
- Administrative Directory: Path from the Perl scripts to the admin directory.
- CGI Scripts Directory: Path from STUDYNAMElogin.html to the Perl scripts.
- Data Directory: Path from the Perl scripts to the data directory.
- Relative Path from CGI Scripts to Graphics: Path from the Perl scripts to the graphics directory.
- Relative Path from login.html to Graphics: Path from STUDYNAMElogin.html to the graphics directory.
These changes are stored in the STUDYNAMEpath.cgi, STUDYNAMElogin.html, and STUDYNAMEadmin.html files. The notation "../" means go up one directory.
For example, given the directory structure:
\cgi-bin ciwweb.pl admin.pl (etc.) \htdocs \study1 \admin \data \graphics STUDYNAMElogin.html STUDYNAMEadmin.html
The alternate paths are:
- Administrative Directory: ../htdocs/study1/admin/
- CGI Scripts Directory: ../../cgi-bin/
- Data Directory: ../htdocs/study1/data/
- Relative Path from CGI Scripts to Graphics: ../htdocs/study1/graphics/
- Relative Path from login.html to Graphics: graphics/
Remove STUDYNAMEpath.cgi from the admin directory. Upload the STUDYNAMEpath.cgi, with the modified path information, to the "common cgi-bin" directory next to the Perl scripts.
Make Sure Perl is Working
The best way to verify that Perl is working properly on your server is to use a test script named "test1.pl". You can get "test1.pl" by downloading the file.
Simply unzip the contents of the file and upload "test1.pl" to the cgi-bin folder on your web server. Give "test1.pl" proper execute permissions (755) and test it by browsing to it on your web site (i.e.
http://www.yoursite.com/study1/cgi-bin/test1.pl. The test is successful if you see "Debug Test #1 Successful" on your screen. If you get an error message, or if the code of the script is displayed on the screen, the test failed. Please contact your system administrator for help in running this simple Perl script.
The Perl files (*.pl) need to be uploaded to your web server in "Binary Mode". The two main Perl files are ciwweb.pl and admin.pl. Both of these files need "execute" permissions. Our Perl scripts need to know where the Perl.exe is installed on the web server. Sometimes this is called the "Path to the Perl Interpreter". This path could vary across web servers. You will need to find out from your hosting provider what their Perl path is.
The SSI Web license agreement specifies that our users are not allowed to modify our Perl scripts. However, you are allowed to modify the Path to the Perl.exe. This path can be found at the top of the Perl files ciwweb.pl and admin.pl.