[erlang-questions] [Bug] Re: [Q] how to start httpd in R12B

Ladislav Lenart <>
Thu May 15 18:05:37 CEST 2008

Ladislav Lenart wrote:
> Hello,
> in R11B I used to start httpd server in my application top supervisor
> via exported (but unsupported) httpd:start_link2/1 function which
> no longer exist in R12B. So I changed it to httpd:start_standalone/1.
> After all is started (db, inets, my supervisor which among other
> things starts the HTTP server) I want to add default web users using
> mod_auth:add_user/X. But this fails in gen_server:call/X because
> the locally registered process httpd_auth_8008 does not exist.
> I was trying to figure out who should start it (the mod_auth_server
> module) from the sources but got lost on the way... :-(
 > ...


after all day I finally found the culprit in

mod_auth:store/2 calls directory_config_check/2 to see if the supplied
parameters have allowed values. If successful, store_directory/3 is called.
The bug is in directory_config_check/2 which makes auth_type a mandatory

The patch is attached.

BTW what is your strategy at finding the cause of such problems? I had
to resort to fwrites all over httpd_* modules because the error itself
was completely hidden by the supervisor machinery...

Ladislav Lenart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_auth.diff
Type: text/x-diff
Size: 384 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080515/17478d3a/attachment.bin>

More information about the erlang-questions mailing list