in reply to Re: PerlPlusPlugin: Security CGI problems
in thread PerlPlusPlugin: Security CGI problems

Yes I have it set like this: basically exactly as the example
provided when I downloaded it except I changed URL root to be my CGI directory
and I moved the test script ptk_test.ppl into my cgi-bin directory too.
$URL_ROOT="path to my cgi directory/cgi-bin"; %url = ("$URL_ROOT/neko.ppl" => 4, "$URL_ROOT/plop.ppl" => 2, "$URL_ROOT/y2k.ppl" => 2, "$URL_ROOT/thunder.ppl" => 2, "$URL_ROOT/ptk_test.ppl" => 2, "$URL_ROOT/quest.ppl" => 2, "$URL_ROOT/tktetris.ppl" => 2, ); $sec_level= $url{$url} || 1; print LOG " security level=$sec_level\n"; close LOG; print "Content-type: application/x-perlplus:.ppl:Perl\n\n"; print "$sec_level";
basm101

Replies are listed 'Best First'.
Re^3: PerlPlusPlugin: Security CGI problems
by tall_man (Parson) on Feb 21, 2003 at 17:37 UTC
    I'm not sure it will work that way, with the ppl files in the CGI directory. Apache will try to run it as a CGI script and PerlPlusPlugin will never get a chance at it.

    I configured a separate perl directory with Apache. You could also use a home directory for the scripts.

    Alias /perl/ /var/www/perl/
      ahh that makes sense...I have a perl_scripts folder within my public_html directory and I could put the tk script in there.
      Can I use a perl program as a URL ? I thought all URLs ended in .cgi or .html Perhaps I need to ask my system admin guy
      to setup a perl directory with Apache ?
      or can I just call up the perl scripts from wherever they are in my home user area ?
      eg.
      $URL_ROOT="/basm101/public_html/perl_scripts";
      What's this Alias thing mean ?
      thanks again for your help,
      basm101
        I believe they would work from a public_html directory. You should spell out the whole URL. The sample directory that comes with PerlPlusPlugin has something like this in it:
        $URL_ROOT="http://www.Lehigh.EDU/~sol0/ptk/ppl";
        URL's can end in many things. In fact, that's how the browser knows how to deal with the file. You need to have something like this in apache-mime.types:
        application/x-perlplus ppl
        And of course you have to have the plugin installed for your Netscape browser (e.g. set it up in Preferences/Helper Applications).

        The Alias stuff is for the Apache configuration file, to allow you to have extra directories for things. I wouldn't bother with it since you can put them in your public_html directory instead.