Vhost time settings
am 26.06.2007 16:10:37 von ginHi, it's possible to set different time settings on an apache virtual host
than the rest of the system time
or other vhost time, so that a php script can see different time settings ?
Hi, it's possible to set different time settings on an apache virtual host
than the rest of the system time
or other vhost time, so that a php script can see different time settings ?
On Jun 26, 3:10 pm, "Gin"
> Hi, it's possible to set different time settings on an apache virtual host
> than the rest of the system time
> or other vhost time, so that a php script can see different time settings ?
that kind of thing is best left to setlocale in the app layer, with
apache not AFAIK
> that kind of thing is best left to setlocale in the app layer
Can you explain a bit more about this ?
On Jun 27, 2:24 pm, "Gin"
> > that kind of thing is best left to setlocale in the app layer
>
> Can you explain a bit more about this ?
well the idea is simply to allow your users to control the locale that
gets used in your scripts, so that when they log on they see a time
appropriate to them because the script has detected their location
(remember their settings) and made a call to setlocale with their
language code.
If you could set the system time within a vhost section it would lead
to all kinds of weirdnesses, where one vhost was able to "cheat a php
script" which replied on system time to work - a trial script for
instance. And what would be the use of offsetting a system time for
one vhost, after all system time is what it is. What you are talking
about is "how can get php to see stuff" the answer is set it in the
config section that sets up the environment for each user when they
first log on.
Further exmples woulf include internationalisation, paths, font sizes,
data they saved, user tracking etc.. all require app level settings
and are thus easy to save to a database, easy to manipulate and set
per user, or per "site/vhost".
setlocale is documented in the manual and can be very useful indeed!
Thank you ! :-)
> well the idea is simply to allow your users to control the locale that
> gets used in your scripts, so that when they log on they see a time
> appropriate to them because the script has detected their location
> (remember their settings) and made a call to setlocale with their
> language code.
> If you could set the system time within a vhost section it would lead
> to all kinds of weirdnesses, where one vhost was able to "cheat a php
> script" which replied on system time to work - a trial script for
> instance. And what would be the use of offsetting a system time for
> one vhost, after all system time is what it is. What you are talking
> about is "how can get php to see stuff" the answer is set it in the
> config section that sets up the environment for each user when they
> first log on.
> Further exmples woulf include internationalisation, paths, font sizes,
> data they saved, user tracking etc.. all require app level settings
> and are thus easy to save to a database, easy to manipulate and set
> per user, or per "site/vhost".
> setlocale is documented in the manual and can be very useful indeed!
>