ID:               37908
 Updated by:       [EMAIL PROTECTED]
 Reported By:      php at raj dot homelinux dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Apache2 related
 Operating System: Linux 2.6
 PHP Version:      4.4.2
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2006-06-25 20:06:13] php at raj dot homelinux dot com

this is the 'stock' apache server from RedHat / WBEL

# httpd -V
Server version: Apache/2.0.46
Server built:   Mar 14 2006 20:20:20
Server's Module Magic Number: 20020903:4
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

------------------------------------------------------------------------

[2006-06-25 14:36:17] [EMAIL PROTECTED]

Is it apache2-prefork or apache2-worker?
`httpd -V` usually helps.

------------------------------------------------------------------------

[2006-06-25 14:16:24] php at raj dot homelinux dot com

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.

------------------------------------------------------------------------

[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

Reply via email to