Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8B305108AE for ; Sun, 8 Dec 2013 13:38:52 +0000 (UTC) Received: (qmail 78171 invoked by uid 500); 8 Dec 2013 13:38:46 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 77997 invoked by uid 500); 8 Dec 2013 13:38:39 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 77984 invoked by uid 99); 8 Dec 2013 13:38:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Dec 2013 13:38:36 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of allassopraise@gmail.com designates 209.85.219.45 as permitted sender) Received: from [209.85.219.45] (HELO mail-oa0-f45.google.com) (209.85.219.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Dec 2013 13:38:31 +0000 Received: by mail-oa0-f45.google.com with SMTP id o6so2763451oag.4 for ; Sun, 08 Dec 2013 05:38:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=MSesYzvf254ne7UG9ryrq2ARaRLf199rcYxM3K1h3kY=; b=hZj8wBtEvZYRCPVmGvzN6RsN6bp2NQ6BzIhNpRPG3ExpIwGdW9DDUupxR5khLfzUy4 MM4ifvsAcGJBJTmpONnQvATyfiQtB7A7Fq2saIBVbp5aNI8xYdzHbBJb9EvRQIfKade/ VQcKx65wZfqtk4rxVQfyxmNOUj76bMEK8j8/Z28fk6TJgftwjcU1cvHNdbYnHRKYkc3w DV+S9RBSVmPO5NJX9QmXnmZoeZM0U0cGQwhN3ExweJOgVTef09xsn38UqzmWoU4awZD2 IxkVLAO+dCc6qoL2kCBEX0ZkwNqO5QPMK8OuwVvVTnf3NWqDdzaLXJWeK0BLu049ricL Jzyg== X-Received: by 10.182.40.201 with SMTP id z9mr9415293obk.45.1386509890206; Sun, 08 Dec 2013 05:38:10 -0800 (PST) Received: from [192.168.1.106] (ip-67-209-217-33.bacavalley.com. [67.209.217.33]) by mx.google.com with ESMTPSA id z5sm9781678obg.13.2013.12.08.05.38.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 08 Dec 2013 05:38:09 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) From: Allasso Travesser X-Priority: 3 In-Reply-To: Date: Sun, 8 Dec 2013 06:38:05 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <3C2C6F58-49E0-46C6-899C-2F9D749A2F85@gmail.com> References: <0A1D10568F2340D48B1BEA6EE793AA75@RobertPC> <4E4AF26C5F3B4DBE99343D724302E9F5@RobertPC> <0F1A0D92389C4486B1EED54899C98199@RobertPC> To: users@httpd.apache.org X-Mailer: Apple Mail (2.1822) X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Seg fault when assigning value in AP_INIT_TAKE1 callback Thank you for your input, Nick. I see what you mean about using a full = example; not yet understanding how modules work, it didn=92t occur to me = that cfg would be getting initialized somewhere else. My c programming = skills are also rudimentary. Regarding mod_auth_form, I am using Apache 2.2. I tried just loading a = 2.4 module, but I get errors. If I knew more about Apache and how = modules work, I could probably understand why I am getting the errors. = Hence, the road I am on, as I find it helpful to learn this stuff = anyway. (I am on Ubuntu 10.04, and there is no official package for = Apache 2.4 yet available, and being a nominal linux user I would rather = stick with the mainstream) Thanks for the help :-) Allasso On Dec 8, 2013, at 12:38 AM, Nick Kew wrote: >=20 > On 8 Dec 2013, at 04:17, Allasso Travesser wrote: >=20 >> Hello, >>=20 >> Learning to create modules, I want to read configuration directives. = I used the following example out of =93The Apache Modules Book=94 (Nick = Kew). It compiles fine, however, when I restart apache, I get = segmentation fault: >=20 > So why not start with a complete example, then reduce it step-by-step > to what you have? That way you see where it falls apart and figure = out > why what you just lost mattered. >=20 > In this case ... >=20 >> The fault seems to be a result of this line of code (no error results = if it is removed): >>=20 >> ((txt_cfg*)cfg)->header =3D val ; >=20 > =85 cfg needs to have been initialised, but ... >=20 >> module AP_MODULE_DECLARE_DATA customauthform_module =3D >> { >> STANDARD20_MODULE_STUFF, >> NULL, >> NULL, >> NULL, >> NULL, >> mod_cmds, >> register_hooks, >> }; >=20 > =85 your initialisation function is NULL. >=20 > (judging by the name of your module, maybe the now-standard > mod_auth_form would be a good startingpoint for you?) >=20 > --=20 > Nick Kew > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org > For additional commands, e-mail: users-help@httpd.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org