You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Petr Stetina <pe...@systinet.com> on 2003/05/06 17:17:15 UTC

Re: Help - Apache 2.0

Help - Apache 2.0Hi,
try to change extension of source file from .cxx to .c


Petr
  ----- Original Message ----- 
  From: Guntupalli, Santhi 
  To: 'dev@httpd.apache.org' 
  Sent: Tuesday, May 06, 2003 5:17 PM
  Subject: 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