You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Denise Pederson <De...@usask.ca> on 2002/09/10 19:05:43 UTC

[users@httpd] VMS 7.3 and Perl

We have just successfully installed Compaq Secure Web Server V1.2 (based 
on Apache) on an Alpha running VMS7.3. We have Perl 5.6.1 installed and 
installed the Mod_Perl 1.25. Since there is very little documentation on 
how to get Mod_Perl configured correctly on VMS, I'm wondering if anyone 
out there is actually running CSWS and Mod_Perl.

The Test CGI script works as a DCL command file.

In httpd.conf we added:
     AddHandler cgi-script .pl
      AddHandler cgi-script .com

It also contain the include statement for mod_perl.conf
    Include /apache$root/conf/mod_per.conf

And enabled ExecCGI.
     <Directory "/*/*/public_html">
    Options +ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

Since in unix the shell reads the first line for the document looking 
for the Shebang ( #!/usr/bin/perl) to indicate that its a perl script 
and should be run under Perl.

    So we tried putting the $ perl sys$input at the start for the Perl 
script and if run from the DCL prompt the script executes fine.

$ perl sys$input
#!/usr/bin/perl
print "Content-type: text/html\r\n\r\n";
printf "<html>\n";
printf "<body>\n";

printf "Hello, World.\n";

printf "</body>\n";
printf "</html>\n";

But if you try to exec it from the URL. You get:


  Internal Server Error

The server encountered an internal error or misconfiguration and was 
unable to complete your request.

Please contact the server administrator, you@your.address and inform 
them of the time the error occurred, and anything you might have done 
that may have caused the error.

More information about this error may be available in the server error log.

And the Error log reads:

malformed header from s
cript. Bad header=%DCL-W-IVVERB, unrecognized co: 
/apache$root/cgi-bin/first.pl

Without the first line in the Perl Script being "$ perl sys$input"
 The Error log reads:

"malformed header from s
cript. Bad header=%DCL-W-NOCOMD, no command on l: 
/apache$root/cgi-bin/first.pl"

How can we get apache or mod_perl to recognize it as a perl script and 
execute Perl with this Script??????

-- 
Denise Pederson, BSc.
Systems Administrator
Information Technology Services
University of Saskatchewan
VOICE:	(306) 966-4877
FAX:	(306) 966-2376
105 North Road
Room 201, Peterson Bldg
Saskatoon,Sask. S7N 4L5
EMAIL:Denise.Pederson@USask.ca