Web FAQ 5.02. How do I run a script from my Personal Web space?
Only scripts that are somewhere in the /cgi-bin hierarchy have permission to run. You can run a script in one of three ways:
· Run your script from test.scripts.psu.edu. This server is provided to be able to test scripts.
Note: Scripts that run on test.scripts.psu.edu can run from any subdirectory in your home directory.
Perl is located in /usr/local/bin/perl and should be referenced as shown in this sample. Be aware that "test.scripts.psu.edu" is not a production server and is expected to occasionally crash, hang, and reboot due to programming mistakes in the test scripts running from it.
· Run your script through the Personal Web server's cgi-bin directory. In order to do this, you need to send an e-mail to webmaster@psu.edu specifying where the script resides in your Personal Web space (i.e. some directory in your Personal Web space).
Then, we will install the script into the server's cgi-bin directory for you.
Please note: this will take about 2-3 weeks.
- Run your scripts from anywhere, such as a Web server you set up on your machine. Just change the ACTION field in your FORM tag to reflect this (i.e. put in a complete URL in the ACTION field). This way, your Web pages can be served from www.personal.psu.edu and your scripts can run elsewhere.
For example: <FORM METHOD="POST" ACTION="http://some.web.server/path /script_name.cgi">
Note: You cannot use an absolute URL to a CGI script with the SSI (Server-Side Include) commands #exec cgi or #include virtual, but you can in <form action=>. Both #exec cgi and #include virtual are server side includes and the server parses these itself without contacting some other host. For example, let's say that you have pages on another server and you would like to add one of the counters installed on the Personal server. You would not be able to reference the counter installed on the Personal server in the following manner:
<--#exec cgi="http://www.personal.psu.edu/cgi-bin/counter-nc"-->
You can, as an alternative, you can use one of the graphical counters listed in Section 7 of the WEB FAQ. The graphical counter, unlike the text counter, does not use server side includes; therefore you do not need to worry about setting your file to be parsed by the server (i.e. a .htaccess file is not necessary).