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
<http://www.dmi.me.uk/code/apache/mod_sqltemplate/99_mod_sqltemplate.conf>
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

Reply via email to