httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Vissault <frederic.vissa...@libertysurf.fr>
Subject RE: Help - Apache 2.0
Date Tue, 06 May 2003 15:30:13 GMT
Help - Apache 2.0Hi,
I had the same problem in my module and find in this mail the solution.

If your module is written in c++ and compile with C++ mode, all of your c
code must be write like this :

extern "C" {
   /* your c code */
}

in particular

module AP_MODULE_DECLARE_DATA test_module =

    STANDARD20_MODULE_STUFF,
    NULL,                     /* per-directory config creator */
    NULL,                     /* dir config merger */
    NULL,                     /* server config creator */
    NULL,                     /* server config merger */
    NULL,                     /* command table */
    register_hooks, /* set up other request processing hooks */
};

bye
F. Vissault
  -----Message d'origine-----
  De : Guntupalli, Santhi [mailto:santhi.guntupalli@digital.com]
  Envoyé : mardi 6 mai 2003 17:18
  À : 'dev@httpd.apache.org'
  Objet : Help - Apache 2.0


  Hello,
          I have built my module with Apache 2.0 on windows which creates
DLL mod_test.dll. I am loading this dll by LoadModule from httpd.conf from
my Apache. I copied this this dll to "modules".

          When I start my Apache or check syntax, I am getting this error.

  "C:\ApacheGroup\Apache2\bin>apache -t
  Syntax error on line 174 of C:/ApacheGroup/Apache2/conf/httpd.conf:
  Can't locate API module structure `test_module' in file
C:/ApacheGroup/Apache2/modules/mod_test.dll: No error"

  Even though I defined this "test_module" in mod_test.cxx ( this file
creates mod_test.dll)

  This is my code mod_test.cxx:

  static void register_hooks(apr_pool_t *p)

      ap_hook_handler(server_handler, NULL, NULL, APR_HOOK_MIDDLE);
  }

  module AP_MODULE_DECLARE_DATA test_module =

      STANDARD20_MODULE_STUFF,
      NULL,                     /* per-directory config creator */
      NULL,                     /* dir config merger */
      NULL,                     /* server config creator */
      NULL,                     /* server config merger */
      NULL,                     /* command table */
      register_hooks, /* set up other request processing hooks */
  };

  static int server_handler(request_rec *r)


  ...............
  ...........
  }

  This is my httpd.conf
  -----------------------
  ---------------------------
  LoadModule userdir_module modules/mod_userdir.so
  #LoadModule usertrack_module modules/mod_usertrack.so
  #LoadModule vhost_alias_module modules/mod_vhost_alias.so
  #LoadModule ssl_module modules/mod_ssl.so
  LoadModule jk_module modules/mod_jk-2.0.43.dll

  LoadModule test_module modules/mod_test.dll
  -----------
  ------------------

  What could be the problem, why it is not able to load my module.

  Anybody faced this type of problem, because of this I am stuck here. Any
help is highly appreciated.

  Thanks in advance,
  - GS





Mime
View raw message