You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Locke <br...@swbell.net> on 2010/06/17 06:02:14 UTC
Module development - server config vs directory config
Howdy all..
I'm a new module developer, so be gentle please.
I have written a simple module for Apache 2.0. If I have a create server
config without a create dir config as well, I get a fault from the server
when it loads the module.
The error appears in ap_walk_config_sub in config.c. The call to
ap_set_config_vectors always returns a null.
If I change my module to have a create dir config function, there is no
error.
Am I doing it wrong?
For a test, I took the mod_usertrack and refactored the code so that the
"dir config" info was moved into the server config. It produces the same
problem as my original module.
Thank you in advance for your assistance.
Brian
Re: Module development - server config vs directory config
Posted by Brian Locke <br...@swbell.net>.
Have the book, btw. Didn't remember your name until I got into the office :)
It appears that if your only implementing an ap_hook_fixups function, you
cannot have server only config.
thanks again for your note.
Brian
On Wed, Jun 16, 2010 at 11:18 PM, Brian Locke <br...@swbell.net> wrote:
> Thank you for the redirect on modules dev... I saw apache dev and jumped.
>
> I can post code tomorrow...but when I call the get_config, I am passing
> r->server->xxxconfig (can't remember off the top of my head). Either way, I
> will double check the pointer.
>
> Thank you!
> Brian
>
> sent from my G1 Android phone
>
> On Jun 16, 2010 11:13 PM, "Nick Kew" <ni...@webthing.com> wrote:
>
>
> On 17 Jun 2010, at 05:02, Brian Locke wrote:
>
> > Howdy all..
> > I'm a new module developer, so be ge...
>
> modules-dev might have been a better list to post to.
>
> You're accessing per-dir config when you're looking for server config.
>
> There's a very brief (and old) intro at
> http://www.apachetutor.org/dev/config
> and a more up-to-date full chapter in the book.
>
> --
> Nick Kew
>
>
Re: Module development - server config vs directory config
Posted by Brian Locke <br...@swbell.net>.
Thank you for the redirect on modules dev... I saw apache dev and jumped.
I can post code tomorrow...but when I call the get_config, I am passing
r->server->xxxconfig (can't remember off the top of my head). Either way, I
will double check the pointer.
Thank you!
Brian
sent from my G1 Android phone
On Jun 16, 2010 11:13 PM, "Nick Kew" <ni...@webthing.com> wrote:
On 17 Jun 2010, at 05:02, Brian Locke wrote:
> Howdy all..
> I'm a new module developer, so be ge...
modules-dev might have been a better list to post to.
You're accessing per-dir config when you're looking for server config.
There's a very brief (and old) intro at
http://www.apachetutor.org/dev/config
and a more up-to-date full chapter in the book.
--
Nick Kew
Re: Module development - server config vs directory config
Posted by Nick Kew <ni...@webthing.com>.
On 17 Jun 2010, at 05:02, Brian Locke wrote:
> Howdy all..
> I'm a new module developer, so be gentle please.
modules-dev might have been a better list to post to.
You're accessing per-dir config when you're looking for server config.
There's a very brief (and old) intro at
http://www.apachetutor.org/dev/config
and a more up-to-date full chapter in the book.
--
Nick Kew