www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Scherg <Rainer.Sch...@rexroth.de>
Subject RE: mod_actions/3519: Action - Scripts defaults as cgi?
Date Mon, 14 Dec 1998 09:30:01 GMT
The following reply was made to PR mod_actions/3519; it has been noted by GNATS.

From: Rainer Scherg <Rainer.Scherg@rexroth.de>
To: "'marc@apache.org'" <marc@apache.org>
Cc: "'apbugs@apache.org'" <apbugs@apache.org>
Subject: RE: mod_actions/3519: Action - Scripts defaults as cgi?
Date: Mon, 14 Dec 1998 10:26:13 +0100

 >Synopsis: Action - Scripts defaults as cgi?
 
 >No, I don't see why they should always be executed.  It is very
 >possible that you want someone to be able to use the Action
 >directive for existing scripts without letting them make arbitrary
 >things executable.
 
 IMO it's makeing no sense to install a Action-Script without the
 possibility of executing it. (Perhaps I didn't make myself clear
 enough for understanding - sorry my English is not the best...)
 
 A Action directive contains a script which should be executed, when
 the Action condition is triggered. If the Action-Script doesn't match
 the CGI-handler conditions, the Action-script IMO will not be executed.
 
 e.g.:
  Addhandler    cgi-handler .cgi .pl
  ScriptAlias   /cgi-bin/   /cgi-bin
  Action        ph3-script  /some-other-dir/php
 
 The question here is: Should Apache execute /some-other-dir/php?
 IMO: Yes.
 
 Today for most apache webmasters this is a minor problem, because
 they have these programms installed in /cgi-bin and are using the
 default ScriptAlias - directive to make /cgi-bin/php match the cgi-
 handler conditions.
 
 ==> But this is a minor problem - the real problem was to understand
     the Action mechanism - and looking on the php mailing lists,
     most newbies have the same problem (so: I'm not alone ;-)).
 
     I think improving the doc a little bit will make this topic much
     clearer for newbies.
 
 >If you have any particular suggestions for areas where the docs
 >could be improved, please send them, but we really can't do
 >much with a general "they aren't good".
 
 Yep - You are right! Sorry!
 The docs should contain some hints for the Action directive:
 
 1. Correct "Action mime-type ..."  --> "Action handler ..."
    (see our discussion/ my question in news-group: 
 comp.infosys...server.unix)
 
 2. Action  <handler> <cgi-script> has to match the cgi-handler 
 conditions.
    Which means: the script should be placed in a directory covered
    by the ScriptAlias directive, and/or should follow the cgi-script 
 naming
    convention (filename extension).
 
    This is necessary to make apache execute the Action script.
 
 3.  e.g.:
 
       AddHandler    cgi-handler  .cgi
       #ScriptAlias  /cgi-bin/    /cgi-bin
       AddHandler    php3-script  .php3 .phtml
       Action        php3-script  /cgi-bin/php
 
     will not work, because /cgi-bin/php doesn't match the cgi-handler 
 conditions.
 
     WorkAround:
 
      Use ScriptAlias - directive to make all files in /cgi-bin 
 "executable" to apache.
      (This is the default)
 
     Or:
 
      If you have disabled the ScriptAlias directive, you can use the 
 following config:
 
      AddHandler cgi-handler  .cgi
      Action     php3-script  /cgi-bin/php3.cgi
      (make a link from php to php.cgi)
 
 Regards Rainer
 
 
 

Mime
View raw message