libapache2-mod-php5 forgets timezone definition after some time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
Under libapache2-mod-php5 5.3.2-1ubuntu4.10 (as provided by Lucid LTS release) php scripts tend to forget timezone after some time.
The timezone is correctly set in the /etc/php5/
[Date]
date.timezone=UTC
It works properly for several hours after restart of apache. At some point the libapache2-mod-php5 forgets the definition and starts thinking that it's timezone is "America/Chicago".
The problem does not occur if php is run using CLI. Also the problem occurs only on one of my servers. It is not reproducible on other similar servers.
See attached php script for demonstration of the problem. To see the problem, upload the php script to some server and start polling it as follows:
while [ 1 ]; do wget -O - --quiet http://
Once you see "+" in the output, this means the problem exists.
Changed in apache2 (Ubuntu): | |
importance: | Undecided → Medium |
I am sorry, the problem was on my side. We have both python-django and php sites running on the same server. The django-based site was misconfigured to reset server's timezone to "America/Chicago". Apparently if the timezone is specified programmatically by a php or python script, it is automatically visible to all the other scripts (which IMHO is wrong).
Thus, a random visit to the timzeone- insensitive django-based site would automatically reset the server's timezone and thus break the php site (which *is* sensitive to the timezone value).
Close the bug please.