FS#36985 - [php] Cannot set php date.timezone in /etc/php/php.ini

Attached to Project: Arch Linux
Opened by Stefan Tatschner (rumpelsepp) - Thursday, 19 September 2013, 10:11 GMT
Last edited by Pierre Schmitz (Pierre) - Saturday, 02 November 2013, 22:10 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
There is a problem with the most recent php package and the date.timezone setting in the php.ini. I am not able to set the timezone.

I have this in my /etc/php/php.ini:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/Berlin

But with php --info I get this:
stefan@archvm ~ $ php --info | grep php.ini
PHP Warning: Unknown: 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
Configuration File (php.ini) Path => /etc/php
Loaded Configuration File => /etc/php/php.ini

The setting should not be mispelled because of this: http://www.php.net/manual/en/timezones.europe.php
I also tried UTC and GMT and I got the same warning.

Additional info:
* package version(s)
stefan@archvm ~ $ pacman -Q | grep php
php 5.5.3-1
php-apache 5.5.3-1
php-apcu 4.0.2-1
php-cgi 5.5.3-1
php-gd 5.5.3-1
php-geoip 1.0.8-3
php-intl 5.5.3-1
php-mcrypt 5.5.3-1
php-odbc 5.5.3-1
php-pear 5.5.3-1
php-pgsql 5.5.3-1
php-pspell 5.5.3-1
php-sqlite 5.5.3-1
php-tidy 5.5.3-1
php-twig 1.13.2-1
This task depends upon

Closed by  Pierre Schmitz (Pierre)
Saturday, 02 November 2013, 22:10 GMT
Reason for closing:  Upstream
Comment by Stefan Tatschner (rumpelsepp) - Saturday, 21 September 2013, 14:58 GMT
I have downgraded all the mentioned packages to version 5.4.18. It works again.
Comment by Pierre Schmitz (Pierre) - Sunday, 22 September 2013, 09:22 GMT
This works fine for me. Did you try with the default php.ini? This is probably a configuration issue on your site.
Comment by Stefan Tatschner (rumpelsepp) - Wednesday, 25 September 2013, 08:49 GMT
I figured out the problem. I use the new zend cache and apcu.

At first, I have this in my php.ini
extension=apcu.so
zend_extension=opcache.so

; OPCache Settings
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1

; APC Settings
apc.enabled=1
apc.shm_size=32M
apc.ttl=7200
apc.enable_cli=1

Because there is a bug with piwik, I disabled the caching engine on my piwik host with:
[HOST=myhost.com]
opcache.enable=0

When I remove the piwik part, the warning is gone.

edit: here is the reference: http://forum.piwik.org/read.php?2,105879
Comment by Pierre Schmitz (Pierre) - Saturday, 02 November 2013, 22:09 GMT
You cannot really disable opcache on a per host base. (unless you use separate php-fpm instances for each host)

Loading...