Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 78635 invoked from network); 11 Jan 2007 20:18:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jan 2007 20:18:02 -0000 Received: (qmail 8437 invoked by uid 500); 11 Jan 2007 20:18:08 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 8408 invoked by uid 500); 11 Jan 2007 20:18:08 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 8399 invoked by uid 99); 11 Jan 2007 20:18:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jan 2007 12:18:08 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of djwortham@gmail.com designates 209.85.132.251 as permitted sender) Received: from [209.85.132.251] (HELO an-out-0708.google.com) (209.85.132.251) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jan 2007 12:17:58 -0800 Received: by an-out-0708.google.com with SMTP id c8so265697ana for ; Thu, 11 Jan 2007 12:17:37 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=WQsYJzmnYedZEMyjZ/SpFy2HUq2gMjwhysmYwc/s1pzVgfBgZQMo+k+NTjzwLPeUadUZQbFK84u4JWJ39SUi/AHnpjxNjgG9zCJalxrBFDfUrW+MVjswyS2/VHtUBaxYvyPF/A7/UcjrnQCItIBX8r9LJssX5+rxYvtJ8FChi80= Received: by 10.35.27.1 with SMTP id e1mr3179825pyj.1168546657725; Thu, 11 Jan 2007 12:17:37 -0800 (PST) Received: by 10.35.79.1 with HTTP; Thu, 11 Jan 2007 12:17:37 -0800 (PST) Message-ID: <5280fae50701111217i1e9108d7sa3325067690fd326@mail.gmail.com> Date: Thu, 11 Jan 2007 13:17:37 -0700 From: "David Wortham" To: modules-dev@httpd.apache.org Subject: Re: ap_get_module_config() questions... In-Reply-To: <45A59A60.3080804@jupiterhosting.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_20843_10993467.1168546657680" References: <45A59A60.3080804@jupiterhosting.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_20843_10993467.1168546657680 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Drew, I can only respond to two of your questions (intelligently): First, how do I return valuable information if there's a config error? > For example, if my config has the directive "MyFile conf/foo.txt" and > the file doesn't exist, how can I report this when I run httpd -t? If the error can be detected during a directive-handler, simply returning a non-NULL string will output the error string to STDERR and halt the startup process. If the error detection happens later during the server process, you will have to take different actions, but you should use a function like "ap_log_rerror(...)" to output the error description to the server's error log (what you do beyond that is up to you... the module programmer). Second, the documentation (er, at least http_config.h) suggest using > r->per_dir_config or s->module_config for the conf vector (first arg). > I can only get things to work if I pass cmd->server->module_config. Is > this the same as s->module_config? Is this a coding blunder? To explicitly answer your question, they are the same thing, only with an intermediate variable set to the "server* s". Look at this page (at the very bottom): http://modules.apache.org/doc/API.html#servconf The example function creates its own "server* s" as a pointer to the server (pointer) in the cmd_parms struct. I believe this step was skipped over by your documentation page. Hope this helps, Dave ------=_Part_20843_10993467.1168546657680--