You are not logged in.

#1 2009-09-24 18:30:54

boris
Member
Registered: 2006-02-25
Posts: 20

php 5.3 error: Message: date(): It is not safe to rely on the system's

After doing what the error message says:

A PHP Error was encountered

Severity: Warning

Message: 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 'America/New_York' for 'EDT/-4.0/DST' instead

Filename: libraries/Log.php

Line Number: 89

Ive added America/New_York into my php.ini configuration, restarted httpd and the error message persists.

I found a relevant bug but it seemed to be closed as a dup of another bug that only seems to suggest a fix is in cvs

http://bugs.php.net/bug.php?id=48534

Does anyone know whereabout this patch may be for a temporary fix? Also display_errors is off in my settings.

Thanks

Offline

#2 2009-09-24 18:51:09

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: php 5.3 error: Message: date(): It is not safe to rely on the system's

I got that warning message, but after setting the time zone it went away. I even used the same time zone as you're using. I doubt that helps you much, but I was just letting you know that it is working here. Any info you need from my that you think may help?


Matt

"It is very difficult to educate the educated."

Offline

#3 2009-09-24 18:56:45

boris
Member
Registered: 2006-02-25
Posts: 20

Re: php 5.3 error: Message: date(): It is not safe to rely on the system's

Hi Matt,

At least thats good news, a couple of things, could I get your output of :

$ pacman -Q|grep php

If php-cgi installed,

$ php-cgi -m


Thanks!

Offline

#4 2009-09-25 00:22:11

grassmonk
Member
From: Utah
Registered: 2007-11-14
Posts: 68

Re: php 5.3 error: Message: date(): It is not safe to rely on the system's

I had this problem on a CentOS server that I upgraded a while ago.  It was caused by having the mysqli extension enabled but not having the PDO extension enabled.  Once I enabled PDO the error went away.

Last edited by grassmonk (2009-09-25 00:22:29)

Offline

#5 2009-09-25 00:56:15

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: php 5.3 error: Message: date(): It is not safe to rely on the system's

No php-cgi.

Output of pacman -Q|grep php

php 5.3.0-3
php-apache 5.3.0-3

If there's anything else, let me know.


Matt

"It is very difficult to educate the educated."

Offline

#6 2009-09-25 13:26:58

boris
Member
Registered: 2006-02-25
Posts: 20

Re: php 5.3 error: Message: date(): It is not safe to rely on the system's

Ok that at least fixed the date problem, thanks Matt.

Now to figure out why a 500 server error is occuring, but yet no logs are being generated as to why that occurs. sad

Offline

#7 2009-09-28 13:45:00

nemodex
Member
Registered: 2007-11-13
Posts: 10

Re: php 5.3 error: Message: date(): It is not safe to rely on the system's

hi,
i have to set in your php.ini the right timezone. In My case date.timezone = Europe/Rome.
.. and i have to uncomment!!

Andrea

Offline

#8 2009-10-18 17:02:44

theloz
Member
Registered: 2008-11-08
Posts: 3

Re: php 5.3 error: Message: date(): It is not safe to rely on the system's

warning: if you upgrade from a previous version of php, maybe your modules directory has been changes. In my configuration, once upgraded to php 5.3, I change my php.ini from

extension_dir = "/usr/lib/php/20060613/"

to

;extension_dir = "/usr/lib/php/20060613/"
extension_dir = "/usr/lib/php/modules/"

Restart apache and everything has to be all right
Hope it'll be of any help

Last edited by theloz (2009-10-18 17:03:21)

Offline

Board footer

Powered by FluxBB