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. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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! |