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

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre

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

Postby infinitiguy » Fri Jun 05, 2009 9:41 pm

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
infinitiguy
Registered User
 
Posts: 5
Joined: Fri Jun 05, 2009 9:38 pm

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

Postby ToonArmy » Fri Jun 05, 2009 9:49 pm

Set the required setting (date.timezone) in php.ini and these messages will go away.
Chris SmithBlogGitHub
Image
In a foreign field he lay. Lonely soldier unknown grave. On his dying words he prays. Tell the world of Paschendale.
User avatar
ToonArmy
Former Team Member
 
Posts: 4607
Joined: Sat Mar 06, 2004 5:29 pm
Location: Worcestershire, UK
Name: Chris Smith

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

Postby Paul » Sat Jun 06, 2009 2:57 pm

also, you should remember that php 5.3 is not released yet and only should be used in development envirements.
Knock knock
Race condition
Who's there?
User avatar
Paul
MOD Team Member
MOD Team Member
 
Posts: 17546
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier

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

Postby ToonArmy » Sat Jun 06, 2009 4:52 pm

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. ;)
Chris SmithBlogGitHub
Image
In a foreign field he lay. Lonely soldier unknown grave. On his dying words he prays. Tell the world of Paschendale.
User avatar
ToonArmy
Former Team Member
 
Posts: 4607
Joined: Sat Mar 06, 2004 5:29 pm
Location: Worcestershire, UK
Name: Chris Smith

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

Postby infinitiguy » Mon Jun 08, 2009 8:22 pm

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?
infinitiguy
Registered User
 
Posts: 5
Joined: Fri Jun 05, 2009 9:38 pm

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

Postby infinitiguy » Mon Jun 08, 2009 8:22 pm

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. :)
infinitiguy
Registered User
 
Posts: 5
Joined: Fri Jun 05, 2009 9:38 pm

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

Postby notaplayer83 » Fri Jul 03, 2009 8:48 pm

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.
notaplayer83
Registered User
 
Posts: 4
Joined: Mon Jun 29, 2009 10:30 pm

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

Postby notaplayer83 » Mon Jul 06, 2009 3:09 pm

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.
notaplayer83
Registered User
 
Posts: 4
Joined: Mon Jun 29, 2009 10:30 pm

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

Postby opconxps » Wed Aug 12, 2009 9:03 pm

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!
opconxps
Registered User
 
Posts: 18
Joined: Tue Jul 14, 2009 6:48 pm

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

Postby opconxps » Thu Aug 13, 2009 12:59 pm

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
opconxps
Registered User
 
Posts: 18
Joined: Tue Jul 14, 2009 6:48 pm

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

Postby opconxps » Tue Aug 18, 2009 1:15 pm

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.
opconxps
Registered User
 
Posts: 18
Joined: Tue Jul 14, 2009 6:48 pm

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

Postby opconxps » Tue Aug 18, 2009 2:42 pm

could it be that support for this version of php is not yet supported? (PHP 5.3.0)
opconxps
Registered User
 
Posts: 18
Joined: Tue Jul 14, 2009 6:48 pm

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

Postby opconxps » Tue Aug 18, 2009 2:58 pm

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...
opconxps
Registered User
 
Posts: 18
Joined: Tue Jul 14, 2009 6:48 pm

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

Postby ToonArmy » Tue Aug 18, 2009 3:15 pm

PHP 5.3 is supported if you configure it correctly like the error message states.
Chris SmithBlogGitHub
Image
In a foreign field he lay. Lonely soldier unknown grave. On his dying words he prays. Tell the world of Paschendale.
User avatar
ToonArmy
Former Team Member
 
Posts: 4607
Joined: Sat Mar 06, 2004 5:29 pm
Location: Worcestershire, UK
Name: Chris Smith

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

Postby ajay2008 » Tue Aug 18, 2009 4:57 pm

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
ajay2008
Registered User
 
Posts: 40
Joined: Tue Apr 01, 2008 7:06 am

Next

Return to 3.0.x Support Forum

Who is online

Users browsing this forum: No registered users and 93 guests

cron