Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: (qmail 90356 invoked from network); 15 Feb 2009 21:21:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Feb 2009 21:21:06 -0000 Received: (qmail 32856 invoked by uid 500); 15 Feb 2009 21:21:05 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 32834 invoked by uid 500); 15 Feb 2009 21:21:05 -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 32822 invoked by uid 99); 15 Feb 2009 21:21:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2009 13:21:05 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dave@dmi.me.uk designates 213.171.205.116 as permitted sender) Received: from [213.171.205.116] (HELO scaramanga.siterage.net) (213.171.205.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2009 21:20:58 +0000 Received: from localhost (scaramanga.siterage.net [127.0.0.1]) by localhost.akadia.com (SiteRage Mail Server) with ESMTP id 908EB53581 for ; Sun, 15 Feb 2009 21:20:36 +0000 (GMT) X-Spam-Score: -4.08 X-Spam-Level: Received: from scaramanga.siterage.net ([127.0.0.1]) by localhost (scaramanga.siterage.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id UdaHkM7jt0mn for ; Sun, 15 Feb 2009 21:20:32 +0000 (GMT) Received: from [192.168.1.65] (host86-136-123-92.range86-136.btcentralplus.com [86.136.123.92]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by scaramanga.siterage.net (SiteRage Mail Server) with ESMTPSA id 4CA88CEA8 for ; Sun, 15 Feb 2009 21:20:32 +0000 (GMT) Message-ID: <4998871E.70602@dmi.me.uk> Date: Sun, 15 Feb 2009 21:20:30 +0000 From: Dave Ingram User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8.1.19) Gecko/20081209 Lightning/0.9 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: Re: mod_vhost_dbd References: <013601c98ef4$50227650$f06762f0$@jorge@decimal.pt> <499874F0.9090908@dmi.me.uk> <013201c98fa9$98ddaf80$ca990e80$@jorge@decimal.pt> <015501c98fac$1edbfbd0$5c93f370$@jorge@decimal.pt> <49987F6A.7030502@dmi.me.uk> <015f01c98faf$bbc63e30$3352ba90$@jorge@decimal.pt> In-Reply-To: <015f01c98faf$bbc63e30$3352ba90$@jorge@decimal.pt> X-Enigmail-Version: 0.95.7 Content-Type: multipart/alternative; boundary="------------000608070308090409060801" X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Flag: NO X-Old-Spam-Status: No, score=-4.08 required=5 tests=[ALL_TRUSTED=-1.8, AWL=0.318, BAYES_00=-2.599, HTML_MESSAGE=0.001] --------------000608070308090409060801 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Jorge Bastos wrote: >> This is possible using mod_sqltemplate. Suppose in your database, you >> have a "php_register_globals" column, which is either "On" or "Off". >> Then this will work: >> >> [snip] > > So I think my problem is resolved! > Resuming, I can have as many columns I want in the hosts table, correct? If > so, I can have the config I want!!! That's fantastic, I've been looking for > something like this for some years! > Yup. I place no restrictions at all. It doesn't even have to be a single table -- it can be the result of a multi-table join, as long as all of the columns have different names. They can be renamed using "AS", like "SELECT a.id, a.name, h.name AS hname FROM table1 a, table2 h" for example, which would then be accessed as ${id}, ${name}, ${hname}. Take a quick glance at the sample configuration from the mod_sqltemplate site. >> You can tell Apache to perform a config reload (e.g. via apache2ctl >> graceful), which will force the configuration to be re-read from the >> database. >> > > Hum but this only via commandline correct? > It can be from anything that can send Apache a signal (USR1 causes a graceful restart) as well. Running apache2ctl can be done from anything that has the right permissions to signal Apache. As an incidental note, I'm planning on writing a PHP patch that allows you to force Apache to do a graceful restart, but I haven't had the time to think about the best way to do this yet. > Another thing, apache read's this, when it loads and stays with this info on > memory correct? > That's correct. > The existing virtualhosts that I have, I can leave that intact, and start > using the new virtualhosts with this configuration, correct? > You can leave your existing configuration files and create a completely new one that handles all of your new virtualhosts. Dave --------------000608070308090409060801--