1

Possible Duplicate:
PHP - It is not safe to rely on the system’s timezone settings

I've an existing project in symfony 1.4/propel 1.4. Its running fine on productions server (RedHat) and on my local development environment (WAMP Server on windows 7).

I'm setting a new scaling server, running on OpenSuse 12.1, for local office testing over intranet.

Everything is fine but I'm getting following warnings on HTML page

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 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /home/admin/svntestco/troupasvn/trunk/lib/vendor/symfony/lib/config/sfRootConfigHandler.class.php on line 91

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 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /home/admin/svntestco/troupasvn/trunk/lib/vendor/symfony/lib/config/sfDefineEnvironmentConfigHandler.class.php on line 66

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 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /home/admin/svntestco/troupasvn/trunk/lib/vendor/symfony/lib/config/sfDefineEnvironmentConfigHandler.class.php on line 66

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/admin/svntestco/troupasvn/trunk/lib/vendor/symfony/lib/config/sfRootConfigHandler.class.php:91) in /home/admin/svntestco/troupasvn/trunk/lib/vendor/symfony/lib/storage/sfSessionStorage.class.php on line 93

Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /home/admin/svntestco/troupasvn/trunk/lib/vendor/symfony/lib/storage/sfSessionStorage.class.php on line 171

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/svntestco/troupasvn/trunk/lib/vendor/symfony/lib/config/sfRootConfigHandler.class.php:91) in /home/admin/svntestco/troupasvn/trunk/lib/vendor/symfony/lib/response/sfWebResponse.class.php on line 336

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/svntestco/troupasvn/trunk/lib/vendor/symfony/lib/config/sfRootConfigHandler.class.php:91) in /home/admin/svntestco/troupasvn/trunk/lib/vendor/symfony/lib/response/sfWebResponse.class.php on line 357

I know issue is with some timezone settings but I dont know how to fix it. I try to find out php.ini file in use but could not as php was installed through Yast. Can someone please give the the file name (probably php.ini), its location on opensuse and the change needed to fix that.

Please note, we are using nginx, not apache.

Community
  • 1
  • 1
Kapil Sharma
  • 10,135
  • 8
  • 37
  • 66

1 Answers1

1

For Symfony you should look that you have installed the php_intl extension. I had problem.

The second is you should set your timezone in your php.ini file.

php.ini:

[Date]
; Defines the default timezone used by the date functions
date.timezone = Europe/Berlin 

for example.

René Höhle
  • 26,716
  • 22
  • 73
  • 82
  • Thanks Stony, I did that on my local wamp but I was not sure about php.ini location on suse. I found that now, its `/etc/php5/cli/php.ini`. Thanks for the reply. – Kapil Sharma Oct 11 '12 at 12:38