Pwee does allow you to change the environment based on virtual host by
setting a php_value for pwee.userconfpath in either the VirtualHost
specification or .htaccess file. There's a brief section on the web site
about this. It's not as elegant a solution as you'd like though. Being able
to specify a "vhost" attribute to filter environments by virtual host the
same way it currently does based on IP address is a good idea. I would have
done this already but I don't know how to determine what virtual host is
handling the current request. One solution would be to define a php_value
that defines what the filter should be. When the virtual hosts change I
would see that filter value change. That would still require you to edit
your VirtualHost or .htaccess though. If there's another way to determine
the "active" virtual host, maybe someone else can point me in a direction.

Lance

> -----Original Message-----
> From: Colin Viebrock [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 07, 2002 11:12 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache
> the
>
>
> Lance,
>
> I just noticed this post, and PWEE sounds pretty interesting.
>
> One thing that would definitly make me consider using it in a production
> environment would be the ability to change configuration based on the
> name of the vhost being accessed.
>
> For example, we've got several sites all running the same code on the
> same IP.  I use an auto_prepended file to check the hostname being
> accessed, and then include() some site-specific variables to change the
> look and feel of the site.  Take a look at:
>
>       http://domains.dslreports.com/
>       http://bell.easydns.ca/
>       http://domains.canadacomputes.com/
>
> If I could set up PWEE with something like this:
>
> <?xml version="1.0"?>
> <Environments>
>   <Application name="DNS_PARTNERS" namespace="">
>     <Server vhost="domains.dslreports.com">
>       <Constants>
>         <Constant name="DATABASE_HOSTNAME" value="dsl" />
>       </Constants>
>     </Server>
>     <Server vhost="bell.easydns.ca">
>       <Constants>
>         <Constant name="DATABASE_HOSTNAME" value="bell" />
>       </Constants>
>     </Server>
>       ... etc ...
>   </Application>
> </Environments>
>
> Is this possible in PWEE right now?  If not, would you consider adding
> support for it?
>
> - Colin
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to