Bug #53389 [Asn->Fbk]: $_SERVER['REQUEST_TIME'] is wonky.
Edit report at http://bugs.php.net/bug.php?id=53389&edit=1
ID: 53389
Updated by: iliaa@php.net
Reported by: Jared dot Williams at ntworld dot com
Summary: $_SERVER['REQUEST_TIME'] is wonky.
-Status: Assigned
+Status: Feedback
Type: Bug
Package: Scripting Engine problem
Operating System: Ubuntu 10.10 64bit
PHP Version: trunk-SVN-2010-11-23 (SVN)
Assigned To: iliaa
Block user comment: N
Private report: N
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Cannot reproduce it here.
Previous Comments:
------------------------------------------------------------------------
[2010-12-13 18:28:18] kalle@php.net
Ilia, you changed REQUEST_TIME in trunk, any chance of looking at this
one?
------------------------------------------------------------------------
[2010-11-24 15:29:33] Jared dot Williams at ntworld dot com
The problem does not appear when using CLI sapi
jared@ubuntu:/var/www/framework.localhost/htdocs$ php -v
PHP 5.3.99-dev (cli) (built: Nov 24 2010 14:20:11)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2010 Zend Technologies
jared@ubuntu:/var/www/framework.localhost/htdocs$ php time.php
$_SERVER['REQUEST_TIME']: 1290608702.0154
time(): 1290608702
However via Apache2
jared@ubuntu:/var/www/framework.localhost/htdocs$ wget -O time.txt
http://framework.localhost/time.php
--2010-11-24 14:28:06-- http://framework.localhost/time.php
Resolving framework.localhost... 127.0.0.1
Connecting to framework.localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 65 [text/plain]
Saving to: `time.txt'
100%
[==============================================================================>
] 65 --.-
K/s in 0s
2010-11-24 14:28:06 (6.30 MB/s) - `time.txt' saved [65/65]
jared@ubuntu:/var/www/framework.localhost/htdocs$ cat time.txt
$_SERVER['REQUEST_TIME']: 5.1652845131895E+18
time(): 1290608886
jared@ubuntu:/var/www/framework.localhost/htdocs$
------------------------------------------------------------------------
[2010-11-23 17:14:49] Jared dot Williams at ntworld dot com
Description:
------------
$_SERVER['REQUEST_TIME'] seems to fluctuate. 4 runs of
$_SERVER['REQUEST_TIME']: 4.4291801813059E+17
time(): 1290528694
$_SERVER['REQUEST_TIME']: 4.4291801813268E+17
time(): 1290528708
$_SERVER['REQUEST_TIME']: -3.689152654376E+18
time(): 1290528722
$_SERVER['REQUEST_TIME']: 2.2138054492136E+18
time(): 1290528739
Test script:
---------------
<?php
header('Content-Type: text/plain');
echo "\$_SERVER['REQUEST_TIME']: ", $_SERVER['REQUEST_TIME'],
"\ntime(): ", time(), "\n";
Expected result:
----------------
$_SERVER['REQUEST_TIME'] to be approximately inline with time()
Actual result:
--------------
Wonky.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53389&edit=1
Thread (5 messages)