php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63368 Apache 2.2.15 + mod_fcgid + PHP 5.3.3 ignores global timezone
Submitted: 2012-10-26 11:35 UTC Modified: 2012-10-29 02:19 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:3 (100.0%)
From: mega dot venik at gmail dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.3.18 OS: Centos 6.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mega dot venik at gmail dot com
New email:
PHP Version: OS:

 

 [2012-10-26 11:35 UTC] mega dot venik at gmail dot com
Description:
------------
There's a Centos6.3 system. Apache 2.2.15 + mod_fcgid + PHP 5.3.3

There's a problem with date.timezone value. It's mentioned in the global /etc/php.ini like this:

date.timezone = "Europe/Moscow"

And doesn't mentioned in user's local php.ini. As a result, I'm getting lot's of warnings like:

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EEST/3.0/DST' instead in ...

Including the date.timezone parameter into the user's php.ini solves the problem, but I don't think, that it's the best solution.

Why PHP doesn't read the timezone value from the global config file?

Thanks!


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-10-26 11:36 UTC] mega dot venik at gmail dot com
correction
 [2012-10-26 11:36 UTC] mega dot venik at gmail dot com
-Summary: Apache 2.2.15 + mod_fcgid + PHP 5.3.3 +Summary: Apache 2.2.15 + mod_fcgid + PHP 5.3.3 ignores global timezone
 [2012-10-26 17:38 UTC] hanskrentel at yahoo dot de
> Why PHP doesn't read the timezone value from the global config file?

Actually it does. Please double check the setting in the global php.ini 
configuration file. The FCGI PHP binary on your system might be 
configured to fetch a different global php.ini than the one you named: 
/etc/php.ini

The error is likely on your end and configuration.

Please double-check which php.ini is used with your fcgi configuration.
 [2012-10-26 17:58 UTC] mega dot venik at gmail dot com
> Actually it does. Please double check the setting in the global php.ini 
configuration file. The FCGI PHP binary on your system might be 
configured to fetch a different global php.ini than the one you named: 
/etc/php.ini

Nope. Everything's fine, as I can see here:

Configure Command 	'./configure' '--build=x86_64-unknown-linux-gnu' '--host=x86_64-unknown-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/lib64/mysql/mysql_config' '--enable-dom=shared' '--with-pgsql=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--with-curl=shared,/usr' '--enable-fastcgi' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr/lib64/mysql/mysql_config' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--with-sqlite3=shared,/usr' '--enable-json=shared' '--enable-zip=shared' '--without-readline' '--with-libedit' '--with-pspell=shared' '--enable-phar=shared' '--with-tidy=shared,/usr' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-posix=shared' '--with-unixODBC=shared,/usr' '--enable-fileinfo=shared' '--enable-intl=shared' '--with-icu-dir=/usr' '--with-enchant=shared,/usr' '--with-recode=shared,/usr'
Server API 	CGI/FastCGI
Virtual Directory Support 	disabled
Configuration File (php.ini) Path 	/etc
Loaded Configuration File 	/var/www/php-bin/adminhost-dns/php.ini
Scan this dir for additional .ini files 	/etc/php.d
 [2012-10-29 02:19 UTC] aharvey@php.net
-Status: Open +Status: Not a bug
 [2012-10-29 02:19 UTC] aharvey@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 09:01:26 2024 UTC