[php-maint] Bug#709023: libapache2-mod-php5filter: $_SERVER['REQUEST_TIME'] returns miliseconds instead of seconds
bailey86
kbailey at freewayprojects.com
Mon May 20 10:48:10 UTC 2013
Package: libapache2-mod-php5filter
Severity: normal
Dear Maintainer,
* What led up to the situation?
Installed a Drupal website and had the error:
SQLSTATE[22003]: Numeric value out of range: 1264
when trying to log in for the first time.
* What exactly did you do (or not do) that was effective (or
ineffective)?
I did a quick and dirty fix by adding in php.ini auto_prepend_file=/somepath/prepend.php and inside that file:
$_SERVER['REQUEST_TIME'] = time();
Then restarted apache.
But I actually solved the problem for myself by installing the package libapache2-mod-php5 which replaced the package
libapache2-mod-php5filter.
* What was the outcome of this action?
By replacing the package it was fixed for me - but obviously the bug is still in libapache2-mod-php5filter.
An easy way to test for this problem is to create a simple PHP page with just phpinfo() in it. You can then view the value for
_SERVER["REQUEST_TIME"]. The value returned should be in the range of 1369042834 which is the number of seconds since the epoch
- if the number is much larger then the value is being returned in millseconds or microseconds which is incorrect. See:
http://php.net/manual/en/reserved.variables.server.php
BTW - it looks like
$_SERVER['REQUEST_TIME_FLOAT'] = time();
is wrong as well - it should probably return something like 1369044192.707 but again it looks like milliseconds are being
returned.
* What outcome did you expect instead?
-- System Information:
Debian Release: 7.0
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libapache2-mod-php5filter depends on:
ii apache2-mpm-itk 2.2.22-13
ii apache2.2-common 2.2.22-13
ii libbz2-1.0 1.0.6-4
ii libc6 2.13-38
ii libcomerr2 1.42.5-1.1
ii libdb5.1 5.1.29-5
ii libgssapi-krb5-2 1.10.1+dfsg-5
ii libk5crypto3 1.10.1+dfsg-5
ii libkrb5-3 1.10.1+dfsg-5
ii libmagic1 5.11-2
ii libonig2 5.9.1-1
ii libpcre3 1:8.30-5
ii libqdbm14 1.8.78-2
ii libssl1.0.0 1.0.1e-2
ii libxml2 2.8.0+dfsg1-7+nmu1
ii mime-support 3.52-1
ii php5-common 5.4.4-14
ii tzdata 2013b-2
ii ucf 3.0025+nmu3
ii zlib1g 1:1.2.7.dfsg-13
libapache2-mod-php5filter recommends no packages.
Versions of packages libapache2-mod-php5filter suggests:
pn php-pear <none>
More information about the pkg-php-maint
mailing list