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.
Get Involved
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
ajay2008
Registered User
Posts: 41
Joined: Tue Apr 01, 2008 7:06 am

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

Post by ajay2008 »

Is there anyone here that can tell me where to find the php.ini file in 3.0.1? I don't think that I have one.

Please
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52767
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

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

Post by stevemaury »

Your host has control of that file. It is the php settings file. You don't have that file.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
ajay2008
Registered User
Posts: 41
Joined: Tue Apr 01, 2008 7:06 am

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

Post by ajay2008 »

Got it all fixed. Solution was to call the hosting company and the problem was on the server. They fixed the problem and all is well.. Thanks for all the help.
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

Post by opconxps »

ToonArmy wrote:PHP 5.3 is supported if you configure it correctly like the error message states.
Can you offer some suggestions please?

This is how I have my php.ini configured and it still didn't work. Please keep in mind that this is on my test server...

Code: Select all

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/Texas
ToonArmy
Former Team Member
Posts: 4608
Joined: Sat Mar 06, 2004 5:29 pm
Location: Worcestershire, UK
Name: Chris Smith
Contact:

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

Post by ToonArmy »

You don't have the correct php.ini file take a look at the output from phpinfo() for the correct location.
Chris SmithGitHub
User avatar
Dog Cow
Registered User
Posts: 2507
Joined: Fri Jan 28, 2005 12:14 am
Contact:

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

Post by Dog Cow »

Alternatively, one may set

Code: Select all

// Set time zone
date_default_timezone_set('UTC');
At the top of common.php
riceje7
Registered User
Posts: 2
Joined: Sun Sep 06, 2009 2:44 pm

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

Post by riceje7 »

looks like that did it. thank you so much
icormeau
Registered User
Posts: 2
Joined: Wed Feb 27, 2008 10:49 pm

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

Post by icormeau »

On Fedora 12, its sits in /etc/php.ini
MrTeddison
Registered User
Posts: 1
Joined: Fri Feb 12, 2010 1:31 pm

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

Post by MrTeddison »

Well, for those of you who just want to get rid of that message, this is what I did.
In index.php delete the whole "$now" section for date and time and replace it with this:

$timezone = new DateTimeZone( "Asia/Tokyo" );

Replacing "Asia/Tokyo" with your time zone. That is it! Let me know if it works, but please don't get too technical on me because I am 100% new to this. So much so, that I don't even know what version of php I am running. I am running phpbb from a Mac Pro with Snow Leopard Server and I had that same problem if that helps.

Enjoy!
MStep85
Registered User
Posts: 8
Joined: Mon Mar 01, 2010 4:45 pm

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

Post by MStep85 »

what if i dont have a php.ini file in the etc foldeR? im looking in the ftp thing and cant find php.ini anywhere..? help plz
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

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

Post by Erik Frèrejean »

Dog Cow wrote:Alternatively, one may set

Code: Select all

// Set time zone
date_default_timezone_set('UTC');
At the top of common.php
Or even better contact your host that their php isn't configured correctly ;).
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
verakot
Registered User
Posts: 29
Joined: Sat Jun 12, 2010 3:25 am

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

Post by verakot »

Dog Cow wrote:Alternatively, one may set

Code: Select all

// Set time zone
date_default_timezone_set('UTC');
At the top of common.php
This solution worked. Thank you!
:geek:
User avatar
BlobS
Registered User
Posts: 34
Joined: Sat Nov 01, 2008 8:09 am
Contact:

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

Post by BlobS »

Hello,

I did absolutely nothing and all the following warnings are popping out in the header of my index page:

[phpBB Debug] PHP Notice: in file /index.php on line 86: 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 'America/New_York' for 'EDT/-4.0/DST' instead
[phpBB Debug] PHP Notice: in file /index.php on line 86: getdate() [function.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
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4284: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4286: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4287: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4288: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)

Any clue?
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

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

Post by Erik Frèrejean »

Your host updated the php install on your server.
Erik Frèrejean wrote:
Dog Cow wrote:Alternatively, one may set

Code: Select all

// Set time zone
date_default_timezone_set('UTC');
At the top of common.php
Or even better contact your host that their php isn't configured correctly ;).
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
Gereem
Registered User
Posts: 93
Joined: Tue May 19, 2009 1:18 am

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

Post by Gereem »

Dog Cow wrote:Alternatively, one may set

Code: Select all

// Set time zone
date_default_timezone_set('UTC');
At the top of common.php

thanks that helped. At first I also got a bit confused because I opened up the file said in error at the top and added this code there and that solved it for some of the forum pages but then when I would go into different parts of the forum (ie. register, or reading the post) the problem at top would appear again just with a different file name. So make sure you go the COMMON.PHP and insert the code there and not at the indicated file at problem at the top of your browser. :mrgreen: thanks!
Locked

Return to “[3.0.x] Support Forum”