
Behavior Research Methods. Instruments. & Computers 1997.29 (2), 189-193 Operate your own World-Wide Web server WIUlAM C. SCHMIDT, RONHOFFMAN, and JOHN MAcDONALD Dalhousie University, Halifax, Nova Scotia, Canada Although many researchers wishing to use the World-Wide Webfor academic purposes rely on cen­ tralized Webservices, they should be aware thatit is neither expensive nor difficult to operate their own server. Doing so provides research-related benefits such as complete control over their host name and documents provided, the guaranteed ability to execute common gateway interface and server-side in­ clude programs, immediate access to their collected data, and the ability to better control who partic­ ipates in their experiments. This paper surveys Web-server software features likely to be of interest to psychologists and conceptually summarizes their operation and use. The basic steps required to set up a Webserver on popular microcomputers are reviewed, and security issues concerning Web-serveropera­ tion are discussed. An accompanying resource Webpage can assist users in setting up their own servers. Numerous applications ofWeb technology promise to These include the ability to use common gateway inter­ assist psychologists. A wide range ofuses for psychology face (COl) programs, server-side includes (SSI), and have already been promoted; these include using the image maps. The benefits of operating your own Web World-Wide Web (WWW) as an instructional aid (Welch server, as opposed to entrusting this task to others, will & Krantz, 1996) and presenting lab and departmental then be examined and security issues pertaining to server Web pages (Krantz, 1995). Some of the more attractive operation discussed. uses of the WWW for psychological research involve interaction with remote participants for the purpose of THE CLIENT/SERVER RELATIONSHIP gathering data in experiments conducted via the Web. Work along this line has already been reported for psychoacous­ Figure 1 depicts a small portion ofthe Web. A client is tical experiments (Welch & Krantz, 1996) and for survey a computer that runs a Web browser, requests informa­ research (Schmidt, 1997). Other research and teaching tion from a Web server, and displays received information applications are sure to follow. to the user according to a predefined convention (hyper­ This paper provides researchers who wish to conduct text markup language, or HTML). experiments via the Web with a conceptual-level descrip­ Within HTML code, links may be found. Such links pro­ tion ofthe operation ofa Web server and familiarizes the vide URLs (universal resource locator-a specially for­ reader with features ofservers that may be ofuse in creat­ matted address ofa document on the Web) to other Web ing well-implemented experiments. Specific Web-server documents or programs, and following such links presents software is not discussed (due to the rapidity with which the user with the content referenced by these. Because of details associated with such software change and the the versatility ofthe URL, any HTML document can ref­ variations that exist across computer platforms). How­ erence any document or program on other Web servers ever, a Web page has been created (http://or.psychology. anywhere on the Web. dal.ca/r-wcs/ WebServerLinks.html) to help users get Web-server software runs in the background on the host started in finding server software that satisfies their goals computer, waiting for document requests to come from and is appropriate for their machines. This resource page various clients. The server responds to such requests by also includes rudimentary directions for setting up a sending HTML-formatted information to the client. The server on a number of popular platforms and provides specific details ofsuch requests conform to the hypertext links to other Web-server resource pages. transfer protocol (HTTP) standard. Clients send requests After discussing the basic concepts underlying the to receive the contents ofa file containing HTML (which client/server relationship, a number ofsoftware features is then displayed) or the output ofa program referenced provided by many Web-server programs will be presented. by the URL (the so-called CGI program, the output of which is displayed). The writing ofthis paper was supported by NSERC Canada and the WEB-SERVER FEATURES Izzak Walton Killam Foundation. A page maintained by the first author containing all ofthe links to the resources referenced in this paper, as Different server programs do not have identical capa­ well as topically related links, can be found at http://or.psychology. bilities. For this reason, it is important for experimenters dal.ca/-wcs/WebServerLinks.html. W.C. Schmidt's address is: Depart­ ment ofPsychology, Dalhousie University, Halifax, NS, Canada 83H 4J I to understand precisely what their server software is ca­ (e-mail: [email protected]). pable of doing. Understanding these server features can 189 Copyright 1997 Psychonomic Society, Inc. 190 SCHMIDT, HOFFMAN, AND MACDONALD Computer B Computer A specific information back to the user. The capabilities of the CGI are limited only by programmers, their imagina­ I doc.htm! tion, and the limitations inherent in HTML. Whenever a , user clicks on a button, for instance, a CGI program is called to process the information submitted. i::::~~~~:~!'il Hypertext Link Whenever a CGI program is run, privileged informa­ tion about the HTTP transaction or the environments of both the host and client computers becomes available to the CGI program. Inferences based on such information can help determine actions to take in experimental de­ livery. Table 1 lists some environmental information available to CGI programs and a few ways that such in­ formation could be used by designers ofpsychology ex­ periments to improve the integrity ofthe data collected. For a complete list ofenvironment information available to CGI programs, consult http://hoohoo.ncsa.uiuc.edu/ Computer C cgi/env. html. To be able to run CGIs at all, the experimenter needs Figure 1. The client/server relationship. to be using a Web server that is able to execute CGI pro­ grams, and must have permission to install CGI pro­ grams on the host. Not all servers have CGI capabilities, assist experimenters in overcoming many obstacles to particularly some free or inexpensive server applications. successful data collection by taking appropriate mea­ sures in the implementation oftheir experiments. Server-Side Includes (SSI) Just as CGI programs add the ability for a Web server Common Gateway Interface (CGI) Programs to dynamically deliver information in response to a user's The CGI program is the most powerful component be­ actions (i.e., clicking on a button), SSIs add the ability to hind experiments conducted via the Web, and much use­ execute programs or other directives, but at the time of ful information has already been reported on them (see document delivery and without any actions on the part of Kieley, 1996). These programs enable one to dynami­ the user. SSIs allow the Web server to deliver documents cally use information supplied by the user of the client with tailored information to the client. Built-in instruc­ computer, to transform that information, and to supply tions or specially written programs similar to CGIs are Table 1 Environment Variables Available to CGI and SSI Programs Variable Name Description Potential Use -the URL of the document referencing -ensure that only clients using authentic the CGI on host documents are sending data to your CGI -the browser the client is using to send -knowledge of the user's browser can the request assist in sending properly formatted -contains not only browser name, but HTML (i.e., lynx text browser versus version and system the user is running graphical browsers) (i.e., Windows version, MacOS CPU) -the IP address ofthe remote computer -track who is sending information to hosting the client that is making the your CGI program, or whom your SSI request is sending information to -if available, the name of the -track who is sending information to REMOTE_ADDR computer your CGI program, or whom your SSI -ifunavailable, same as is sending information to REMOTE_ADDR SERVER_NAME -the server's hostname -may be used by self-referencing URLs AUTH_TYPE -ifserver supports password protection, -useful to know how to decode userl then this variable holds protocol password information -ifserver supports password protection, -useful to access identity of user from and the script is protected, this is the within CGI/SSI username approved SCRIPT_NAME -holds virtual path to the script -may be used by self-referencing URLs PATH_INFO -URLs may contain additional info -allows extra information to be passed beyond the SCRIPT_NAME in the URL request -PATH_INFO holds this raw information WWW SERVER 191 executed by the Web server when they are encountered Most SSI-capable servers provide facilities for a num­ within an HTML document and are expanded inline. That ber of functions to Web administrators without pro­ is, before delivering information to the client, the server gramming, such as including the contents offiles in the software filters each document requested, looking for spe­ document being distributed to the client (i.e., embedding cific keywords that instruct it to carry out SSI tasks. The a file within another), the date or time that the client's extra information included can be dynamically computed request was answered, a file's last modification date, or at the time that the document is delivered, allowing spe­ any of the environment information listed in Table 2. cialized or up-to-date information to be delivered to tar­ Not all Web servers support SSIs, so this is a feature geted users. to consider when selecting Web-server software. Keep in The SSI Web-server component fits into the server­ mind that there is a small time overhead in the delivery client relationship on the server side (see the SSI loop of of SSI documents, because they must be interpreted by Computer B in Figure 1).
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages5 Page
-
File Size-