Matt Sergeant ([EMAIL PROTECTED]) said something to this effect on 03/02/2001:
> ...now that I've developed applications that make rather extensive
> use of the Apache API, I would actually love to have an environment
> similar to CGI but providing the full Apache API, including logging,
> notes/pnotes, etc. I realise a lot of this would be tricky and would
> require RPC (thus opening up a security hole in its own right) but
> I think it would be worthwhile.

This is off-topic, pretty much, but interesting nonetheless.

I just stumbled across Apache DSSI <URL:http://apache_dssi.tripod.com/>,
which seems to allow for that. I haven't tried it out, or even
looked at the code yet, but the author apparently considers it
1.0 verion code.

Here is the summary from the page:

    By using this extentions to mod_include, you can make your own
    function for SSI (Server Side Includes) and you can call your
    function with SSI directives. This solution is based on mod_so
    and mod_include.  By using DSSI, you can integrate your CGI easily
    and make your CGI faster than any other CGI accelerator.

The example the author gives pretty much sums it up (this is a
little long, sorry):

  temp_dssi.c:
  
  #include "httpd.h"
  #include "http_config.h"
  #include "http_request.h"
  #include "http_core.h"
  #include "http_protocol.h"
  #include "http_log.h"
  #include "http_main.h"
  #include "util_script.h"
  #include "util_date.h"
  
  int temp_dssi(request_rec *r, char *args)
  {
    const char *s;
    s = ap_table_get(r->subprocess_env,"QUERY_STRING");
    if(s && *s)
      ap_rprintf(r,"%s\n",s);
    if(args && *args)
      ap_rprintf(r,"%s\n",args);
    return OK;
  }
  
  
  Compiling:
  
  $ gcc -c -I/apache_root_dir/include -O2 temp_dssi.c
  $ gcc -I/apache_root_dir/include -O2 temp_dssi.o -shared -o
  temp_dssi.so
  $ cp temp_dssi.so /apache_root_dir/libexec/
  
  
  httpd.conf:
  
  LoadDSSI libexec/temp_dssi.so
  
  
  temp_dssi.shtml:
  
  <html><body><pre>
  <!--#exec func="temp_dssi $DOCUMENT_ROOT" -->
  </pre></body></html>

(darren)

-- 
If NT is your answer, you don't understand the question.

Reply via email to