Opened 15 years ago

Closed 15 years ago

#20374 closed defect (worksforme)

PHP CLI complains of timezone setting although it's set in php.ini

Reported by: shoan Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: php 5.3 Cc: jyrkiwahlstedt
Port: php5

Description

I set the date.timezone variable to Asia/Calcutta, but the PHP CLI still complains about it.

Nirvana:~ shoan$ php -i
PHP Warning:  PHP Startup: 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 'Asia/Calcutta' for 'IST/5.0/no DST' instead in Unknown on line 0
PHP Warning:  PHP Startup: 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 'Asia/Calcutta' for 'IST/5.0/no DST' instead in Unknown on line 0
PHP Warning:  PHP Startup: 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 'Asia/Calcutta' for 'IST/5.0/no DST' instead in Unknown on line 0
phpinfo()
PHP Version => 5.3.0

System => Darwin Nirvana.local 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386
Build Date => Jul 16 2009 13:15:16
Configure Command =>  './configure'  '--prefix=/opt/local' '--mandir=/opt/local/share/man' '--infodir=/opt/local/share/info' '--with-config-file-path=/opt/local/etc/php5' '--with-config-file-scan-dir=/opt/local/var/db/php5' '--enable-calendar' '--with-iconv=/opt/local' '--enable-exif' '--enable-ftp' '--enable-wddx' '--with-bz2=/opt/local' '--with-libxml-dir=/opt/local' '--with-gettext=/opt/local' '--with-libexpat-dir=/opt/local' '--with-xmlrpc' '--enable-soap' '--enable-bcmath' '--enable-mbstring' '--enable-dba' '--enable-zip' '--with-openssl=/opt/local' '--with-mhash=/opt/local' '--with-pcre-regex=/opt/local' '--disable-cgi' '--with-ldap=/usr' '--with-iodbc=/usr' '--with-apxs2=/opt/local/apache2/bin/apxs' '--with-mysql=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_php5/work/mysql5' '--with-pdo-mysql=/opt/local/bin/mysql_config5' '--with-mysql-sock=/opt/local/var/run/mysql5/mysqld.sock' '--with-mysqli=/opt/local/bin/mysql_config5' '--with-sqlite' '--with-pdo-sqlite=/opt/local' '--enable-sqlite-utf8' '--with-pear=/opt/local/lib/php'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /opt/local/etc/php5
Loaded Configuration File => /opt/local/etc/php5/php.ini
Scan this dir for additional .ini files => /opt/local/var/db/php5
Additional .ini files parsed => /opt/local/var/db/php5/apc.ini,
/opt/local/var/db/php5/suhosin.ini,
/opt/local/var/db/php5/xdebug.ini

.... SNIP ....

Nirvana:~ shoan$ grep date.timezone /opt/local/etc/php5/php.ini
date.timezone = 'Asia/Calcutta';

Change History (5)

comment:1 Changed 15 years ago by shoan

Cc: shoanm@… added

Cc Me!

comment:2 Changed 15 years ago by shoan

The warning also shows up Apache logs.

comment:3 Changed 15 years ago by mf2k (Frank Schima)

Cc: jwa@… added; shoanm@… removed
Owner: changed from macports-tickets@… to ryandesign@…
Port: @5.3.0_1 removed

comment:4 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

MacPorts isn't doing anything special about this. You should use a PHP mailing list or the PHP bug tracker. These PHP bugs look similar:

There may be other bugs already reported about this as well.

I can't reproduce the problem here (with "date.timezone = America/Chicago" in php.ini) but there may be several related ini settings that have to be set in a certain way to cause the problem.

comment:5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: worksforme
Status: newclosed

Closing as "worksforme". If there is something we need to change in the php5 port, let me know, but I think this is an upstream issue that you should report there.

Note: See TracTickets for help on using tickets.