Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DD4F27E6A for ; Sat, 13 Aug 2011 16:44:44 +0000 (UTC) Received: (qmail 9622 invoked by uid 500); 13 Aug 2011 16:44:43 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 9585 invoked by uid 500); 13 Aug 2011 16:44:42 -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 9577 invoked by uid 99); 13 Aug 2011 16:44:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Aug 2011 16:44:42 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=FSL_HELO_NON_FQDN_1,HELO_NO_DOMAIN,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.20.83.52] (HELO webthing) (209.20.83.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Aug 2011 16:44:36 +0000 Received: from [192.168.2.4] (walkham.free-online.co.uk [80.229.52.226]) by webthing (Postfix) with ESMTPSA id 09150DC002 for ; Sat, 13 Aug 2011 16:44:14 +0000 (UTC) References: <4E46A0EB.10901@simonecaruso.com> In-Reply-To: <4E46A0EB.10901@simonecaruso.com> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Message-Id: Content-Transfer-Encoding: quoted-printable From: Nick Kew Subject: Re: Can't access module config from handler function Date: Sat, 13 Aug 2011 17:44:13 +0100 To: modules-dev@httpd.apache.org X-Mailer: Apple Mail (2.1084) On 13 Aug 2011, at 17:06, Simone Caruso wrote: > Hi all, >=20 > im writing a module that stores data in a shared memory to set php = conf values > and other in 'traslate_name' hook.. it works fine. >=20 > I decided to output the shm content within an http request using an = handler > (like mod_status). >=20 > In configuration i have this: > > sethandler "module_test_output" > Using it in a would suggest it's per_dir config. >=20 > I setup the shm in post_config hook: > ap_hook_post_config(post_config_hook, NULL, NULL, = APR_HOOK_REALLY_FIRST); ... but per_dir config for your location doesn't exist at post_config = time! > Within the translate_name hook the module access conf->cache correctly = and > shm+rmm works well. because the config it sees hasn't been merged for the I suspect you're using the wrong configuration hierarchy for the job at = hand. If not, then the fix might be as simple as a merge_config function. There's a very brief (and ancient) piece at = http://www.apachetutor.org/dev/config In the book there's a whole chapter, which is both substantially = expanded and updated from that. --=20 Nick Kew=