ID: 37908
User updated by: php at raj dot homelinux dot com
Reported By: php at raj dot homelinux dot com
-Status: Feedback
+Status: Open
Bug Type: Apache2 related
Operating System: Linux 2.6
PHP Version: 4.4.2
New Comment:
MPM?
Here's what I'm using (wbel3)
kernel-2.4.21-40.EL
php-4.3.2-30.ent
httpd-2.0.46-56.ent.WB1
and the program in question is squirrelmail
squirrelmail-1.4.6-5.el3
(in include/validate.php)
I submitted a bug report to squirrelmail, from where i got pointed to
the putenv() documentation and the fact that putenv() isn't working as
expected. See user comments on the putenv() page as well.
Previous Comments:
------------------------------------------------------------------------
[2006-06-25 13:36:49] [EMAIL PROTECTED]
What kind of MPM are you using?
------------------------------------------------------------------------
[2006-06-25 12:56:24] php at raj dot homelinux dot com
Description:
------------
putenv() claims that the env variables are reset to their original
values when the script exits. HOwever, this doesn't seem to be
happening - as a result, if the env var TZ is set from a php script, it
affects apache2 logs, changing the timestamp for all subsequent gets
served by the process that ran this php script which set TZ.
Reproduce code:
---------------
set $timezone different from server timezone and run:
putenv("TZ=".$timeZone);
--
then do a few more gets and check the apache logs, you will see
something like:
xx.xx.xx.xx - - [19/Jun/2006:23:05:18 -0400] "GET ..."
xx.xx.xx.xx - - [19/Jun/2006:23:05:18 -0400] "GET ..."
xx.xx.xx.xx - - [20/Jun/2006:13:05:11 +1000] "GET ..."
(see how the timestamp in the apache log flipped from -0400 to +1000..
thats the problem)
Expected result:
----------------
Timestamps should remain consistent
Actual result:
--------------
Timestamps are not consistent (see example above)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37908&edit=1