Page 1 of 3

date.timezone error at the top of every page on new install

Posted: Fri Jun 05, 2009 9:41 pm
by infinitiguy
Hi all.
I'm using redhat as 4.7 with mysql 5.0.67 and php 5.3.x with phpbb 3.x. I just finished a vanilla install and at the top of all pages I get things similar to the below. My time was orignally off a bit(vmware) but that's fixed now.

Any suggestions for where to look on how to fix this? I'm pretty new to php apps, so I'm not really sure where to start.

Cheers,
-Derek

[phpBB Debug] PHP Notice: in file /index.php on line 86: 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
[phpBB Debug] PHP Notice: in file /index.php on line 86: getdate(): 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

Re: date.timezone error at the top of every page on new install

Posted: Fri Jun 05, 2009 9:49 pm
by ToonArmy
Set the required setting (date.timezone) in php.ini and these messages will go away.

Re: date.timezone error at the top of every page on new install

Posted: Sat Jun 06, 2009 2:57 pm
by Paul
also, you should remember that php 5.3 is not released yet and only should be used in development envirements.

Re: date.timezone error at the top of every page on new install

Posted: Sat Jun 06, 2009 4:52 pm
by ToonArmy
Paul wrote:also, you should remember that php 5.3 is not released yet and only should be used in development envirements.
Testing environments, its release candidate. ;)

Re: date.timezone error at the top of every page on new install

Posted: Mon Jun 08, 2009 8:22 pm
by infinitiguy
Great :) That worked to get rid of the error, but now the time is using EST instead of EDT.

It is currently Mon Jun 08, 2009 3:20 pm
[root@huskar ~]# date
Mon Jun 8 16:17:52 EDT 2009

[root@huskar conf]# cat php.ini | grep date
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York


How can I get it to recognize daylight savings?

Re: date.timezone error at the top of every page on new install

Posted: Mon Jun 08, 2009 8:22 pm
by infinitiguy
btw, the time really isn't that skewed... it's exactly 1 hour apart.. those copy/pastes from my server and the website were just done 3 minutes apart. :)

Re: date.timezone error at the top of every page on new install

Posted: Fri Jul 03, 2009 8:48 pm
by notaplayer83
Would this PHP notice affect the display of the page where I can choose the language packages I want to install?

I installed phpBB3.0.4 with php 5.2.9 and it didn't show any of these errors, then we had to change it to php 5.3.0 and now we're getting this error in every page. It let me configure most of the board settings but when I try to access the language page it won't finish loading and shows me this error:

[phpBB Debug] PHP Notice: in file /includes/acp/acp_language.php on line 1165: 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 'UTC' for 'UTC/0.0/no DST' instead

It shows the error in every page but it hasn't stopped me for letting me configure the board, except for that language page. Oh, and it won't "pay attention" to the changes I made about the board theme and the logo. I changed it to subsilver2 and changed the logo but it hasn't been changed at all.

Thanks a lot for your help :)
Reine.

Re: date.timezone error at the top of every page on new install

Posted: Mon Jul 06, 2009 3:09 pm
by notaplayer83
Hmmmm, well it seems it can affect the language selection. We fixed the timezone and then we were able to set the language correctly. Haven't been able to change the logo tho. But maybe I'm making a mistake or something.

Thanks.

Re: date.timezone error at the top of every page on new install

Posted: Wed Aug 12, 2009 9:03 pm
by opconxps
I apologize for my ignorance, I'm new at this. How should I set it up?

Code: Select all

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/Texas
is this correct? It's not working for me. After I modify my php.ini, do I need to do anything else other than save the file? Please help, thanks!

Re: date.timezone error at the top of every page on new install

Posted: Thu Aug 13, 2009 12:59 pm
by opconxps
Error:

[phpBB Debug] PHP Notice: in file /index.php on line 86: 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/Chicago' for '-5.0/DST' instead
[phpBB Debug] PHP Notice: in file /index.php on line 86: getdate(): 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/Chicago' for '-5.0/DST' instead

Re: date.timezone error at the top of every page on new install

Posted: Tue Aug 18, 2009 1:15 pm
by opconxps
after a fresh install I'm getting this error on the final screen: (Darn I didn't save the error
It said something about the time setting and referenced /includes/functions_messenger.php on line 353


On the Board Index I'm getting this error.

Code: Select all

[phpBB Debug] PHP Notice: in file /index.php on line 86: 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/Chicago' for '-5.0/DST' instead
[phpBB Debug] PHP Notice: in file /index.php on line 86: getdate(): 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/Chicago' for '-5.0/DST' instead
I'm using:
Apache 2.2
MySQL 5.1.35
PHP 5.3.0 win32 vc6 x86
phpbb3 3.0.5

does anyone have a clue as to what i'm doing wrong? I had the same setup on another virtual server for testing and I don't have any problems. well actually the only difference is the php version I was using. I can't recall the previous version I was using. can anyone help me? I've just tried reinstalling everything from scratch twice thinking that I had missed a step. I even created steps as to how to install from my initial installation so that I wouldn't miss anything.

Re: date.timezone error at the top of every page on new install

Posted: Tue Aug 18, 2009 2:42 pm
by opconxps
could it be that support for this version of php is not yet supported? (PHP 5.3.0)

Re: date.timezone error at the top of every page on new install

Posted: Tue Aug 18, 2009 2:58 pm
by opconxps
ok, I've just tested a previous version of PHP (5.2.9-2) and my date.time error went away. I wish I would've done this before. I could've saved a ton of time.

I would think the install requirements would indicate actual versions it supported rather than php version X and up. That statement is somewhat true and false, depending on how you want to look at it. I guess it may work for some but not others.

I will try to report this as some sort of bug to our bugtracker...

Re: date.timezone error at the top of every page on new install

Posted: Tue Aug 18, 2009 3:15 pm
by ToonArmy
PHP 5.3 is supported if you configure it correctly like the error message states.

Re: date.timezone error at the top of every page on new install

Posted: Tue Aug 18, 2009 4:57 pm
by ajay2008
Hi, I just got the same error. I am running 3.0.1 it has been running great for over a year now. Last night I checked it and the error was at the top of the page and the pages were all messed up. I read the thread and cannot find the php.ini file anywhere. Can you tell me where I can find it. And what needs to be done to fix. This is not a new install. Why out of the clear blue did this happen and how can I make sure that it does not happen again.

Thanks for any help