Received: (qmail 7310 invoked by uid 2012); 10 Dec 1998 15:14:28 -0000 Message-Id: <19981210151428.7309.qmail@hyperreal.org> Date: 10 Dec 1998 15:14:28 -0000 From: Rainer Scherg Reply-To: Rainer.Scherg@rexroth.de To: apbugs@hyperreal.org Subject: Action - Scripts defaults as cgi? X-Send-Pr-Version: 3.2 >Number: 3519 >Category: mod_actions >Synopsis: Action - Scripts defaults as cgi? >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Class: change-request >Submitter-Id: apache >Arrival-Date: Thu Dec 10 07:20:00 PST 1998 >Last-Modified: Mon Dec 14 01:30:01 PST 1998 >Originator: Rainer.Scherg@rexroth.de >Organization: >Release: 1.3.3 >Environment: Solaris 2.5.1, gcc >Description: Hi! I'm not really sure, if the following is something for a change request. But should ACTION-scripts not be always executed by apache? Right now it seems to me that Action-scripts will only be executed, if they are matching the cgi-handler (by extension or directory). e.g. #ScriptAlias # -- PHP 3 with Oracle access #AddType application/x-httpd-php3 .php3 #Action application/x-httpd-php3 /cgi-bin/php AddHandler php3-script .php3 Action php3-script /cgi-bin/php.cgi #(link to php) ^^^^ is working Using the directive (as proposed) Action php3-script /cgi-bin/php reports an error like: http://..../cgi-bin/php/abcdefg/xyz.php3 Not found (because not recognized as cgi due to the unset ScriptAliases-Directive) Access rights were set properly... If this is not a bug, but a feature, please make the doc of "Action" somewhat clearer (it took me 2 days to figure this out...). Rainer >How-To-Repeat: >Fix: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: marc State-Changed-When: Thu Dec 10 08:42:12 PST 1998 State-Changed-Why: 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. 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". From: Rainer Scherg To: "'marc@apache.org'" Cc: "'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 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 >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]