[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
user:zeman:addicter [2011/09/07 14:57]
zeman Typo.
user:zeman:addicter [2012/05/14 21:37]
zeman PassEnv
Line 38: Line 38:
     * Look for a ''ScriptAlias'' directive. It tells the server: 1. what path on the hard disk contains scripts that can generate dynamic HTML content on the fly, and 2. how the path will be represented in the URL (web address). For example <code>ScriptAlias /cgi/ "C:/Documents and Settings/Dan/Documents/Web/cgi/"</code> says that the URL ''http://localhost/cgi/anyscript.pl'' leads to your script ''C:\Documents and Settings\Dan\Documents\Web\cgi\anyscript.pl'', and that it's a script (i.e., the server shall invoke it and send its output, instead of sending the script itself).     * Look for a ''ScriptAlias'' directive. It tells the server: 1. what path on the hard disk contains scripts that can generate dynamic HTML content on the fly, and 2. how the path will be represented in the URL (web address). For example <code>ScriptAlias /cgi/ "C:/Documents and Settings/Dan/Documents/Web/cgi/"</code> says that the URL ''http://localhost/cgi/anyscript.pl'' leads to your script ''C:\Documents and Settings\Dan\Documents\Web\cgi\anyscript.pl'', and that it's a script (i.e., the server shall invoke it and send its output, instead of sending the script itself).
     * Under Windows, you will also want to set <code>ScriptInterpreterSource registry</code> It tells the server that the Windows registry shall be used to figure out how to run a script (e.g., that ''C:\Perl\Perl.exe'' binary must be run to interpret a ''.pl'' script).     * Under Windows, you will also want to set <code>ScriptInterpreterSource registry</code> It tells the server that the Windows registry shall be used to figure out how to run a script (e.g., that ''C:\Perl\Perl.exe'' binary must be run to interpret a ''.pl'' script).
 +    * CGI scripts will not run under the same environment as a user command line. They will not see the ''PERLLIB'' variable and thus not find the libraries unless we specifically instruct Apache to pass the variable to the CGI environment: <code>PassEnv PERLLIB PERL5LIB</code>
   * Restart the server. On the main Windows panel, there is (typically in the lower right corner) a set of icons, including a new one for Apache. Right-click on it, select Open Apache Monitor, then Restart.   * Restart the server. On the main Windows panel, there is (typically in the lower right corner) a set of icons, including a new one for Apache. Right-click on it, select Open Apache Monitor, then Restart.
  

[ Back to the navigation ] [ Back to the content ]