Bluehost.com Web Hosting $6.95

AP_INIT_TAKE1 apache module question

This is a discussion on AP_INIT_TAKE1 apache module question within the Apache Web Server forums, part of the Web Server and Related Forums category; Hello, I would appreciate any help you can give me. I am working on an apache (2.0) filter module. ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-02-2006
sherimarie@gmail.com
 
Posts: n/a
Default AP_INIT_TAKE1 apache module question

Hello, I would appreciate any help you can give me.

I am working on an apache (2.0) filter module. I am setting up my
config file to be able to read in a string using AP_INIT_TAKE1 like so:

//////////////////////////////////////////////////////////////////////
MyModuleEnable on

MyModuleDebugFilename debug_filename_mymodule
//////////////////////////////////////////////////////////////////////

I know my filter is reading this value because when I comment out
"MyModuleDebugFilename" and debug, my module is enabled. However, when
I uncomment "MyModuleDebugFilename", I get an error that looks like
this:

//////////////////////////////////////////////////////////////////////
Syntax error on line 6 of /etc/httpd/conf.d/mymodule.conf:
debug_filename_mymodule

Program exited with code 01.
//////////////////////////////////////////////////////////////////////

I have my macro setup as follows:
//////////////////////////////////////////////////////////////////////
AP_INIT_TAKE1( szDebugFilename, SetMyModuleDebugFilename, NULL,
RSRC_CONF, "Debug filename for my module" ),
{ NULL }

static const char* SetMyModuleDebugFilename( cmd_parms *cmd, void
*dummy, const char* arg ) {
MyFilterConfig *pConfig = ap_get_module_config(
cmd->server->module_config, &my_module );

pConfig->debugFilename = apr_pstrdup( cmd->pool, arg );
}
//////////////////////////////////////////////////////////////////////

Anyone have any ideas?

Thanks in advance!

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 11:59 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0