Thread: running a perl script
03-21-04, 01:56 #1Registered User
- Join Date
- Mar 2004
Unanswered: running a perl script
i'm trying to make a webpage on a unix server with perl scripts. my local machine is running win xp. my remote directory structure is /public_html/cgi-bin. i have a script to test for perl support called perl_test.cgi. the first line in this cgi is #!/usr/bin/perl, which is the correct path to the perl interpreter. when i telnet to the unix server and run the script, it works just as expected. however, when i go to the desired url (http://pubpages.unh.edu/~dab7/cgi-bin/perl_test.cgi), i recieve a download prompt. any suggestions? thanks, lui
03-22-04, 03:19 #2Registered User
- Join Date
- Jan 2004
This looks like an error in the webserver configuration. The webserver doesn't know what to do with a .cgi-file...
is cgi activated for the folder where your script is stored??
There must stand something like this in the configuration of your webserver (if you use the Apache) - you have to adapt this to your needs:
# the following line is optional
ScriptAlias /cgi-bin/ /public_html/cgi-bin/
AddHandler cgi-script .cgi .pl
</Directory>board.perl-community.de - The German Perl-Community