Got System Warning: Date()... After Installation

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
markwen
Posts: 3
Joined: 27 Oct 2009, 00:18

Got System Warning: Date()... After Installation

Post by markwen »

Hi Everyone,

I am new to Mantis and I don't know much PHP programming. Now I have one issue asking for help.

After a brand new installation of Mantis 1.1.8 (under apache 2.2/php 5.3/mysql 5.0), I am able to login as administrator. However, I've got the following warnings everywhere:

SYSTEM WARNING: 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 'Australia/Melbourne' for '11.0/DST' instead.

Since it's appearing everywhere, it's very annoying, and hard to use the system.

Could anyone tell me how to resolve this?

Thanks in advance.

Mark
vboctor
Site Admin
Posts: 1293
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Re: Got System Warning: Date()... After Installation

Post by vboctor »

PHP 5.3.x is not supported specially by 1.1.x versions. We are working on supporting it for 1.2.x. You should use PHP 5.2.x.
Migrate your MantisBT to the MantisHub Cloud
markwen
Posts: 3
Joined: 27 Oct 2009, 00:18

Re: Got System Warning: Date()... After Installation

Post by markwen »

Great. Thanks so much.
markwen
Posts: 3
Joined: 27 Oct 2009, 00:18

Re: Got System Warning: Date()... After Installation

Post by markwen »

Still have problems.

After uninstalling PHP 5.3, and installing PHP 5.2, I was not able to login at all. Then I tried to reinstall the database, and the system says the database type is not supported - but it was successful in the first time installation. The MySQL version was 5.0.18. Then I also tried 5.0.45, 4.1.20, and then 5.0.18, none of them works - the error message has always been database type not supported.

Any help?

Thanks.
crispytwo
Posts: 1
Joined: 18 Feb 2010, 19:37

Re: Got System Warning: Date()... After Installation

Post by crispytwo »

I've added

Code: Select all

date_default_timezone_set('UTC');
to the top of the core.php file to bypass this error. It seems to work fine.
use at your own risk :wink:
DanielRuzo
Posts: 1
Joined: 09 Jul 2010, 13:24

Re: Got System Warning: Date()... After Installation

Post by DanielRuzo »

I've posted this message before but I don't know where has gone (sorry if it appears twice).

Open your php.ini file, look for the [Date] section and uncomment the date.timezone setting.

It should be something like this:

Code: Select all

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "America/Montevideo"
Follow this link to find a valud value for your location:
http://www.php.net/manual/es/timezones.php

Regards!

Daniel Ruzo
Danijel
Posts: 1
Joined: 17 Jul 2012, 08:29

Re: Got System Warning: Date()... After Installation

Post by Danijel »

DanielRuzo wrote:I've posted this message before but I don't know where has gone (sorry if it appears twice).

Open your php.ini file, look for the [Date] section and uncomment the date.timezone setting.

It should be something like this:

Code: Select all

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "America/Montevideo"
Follow this link to find a valud value for your location:
http://www.php.net/manual/es/timezones.php

Regards!

Daniel Ruzo
Thanks Daniel.
This fix worked for me. Yeeee!
I opened /etc/php.ini on my CentOS and uncommented that line, and then I restarted Apache web servers ("service httpd restart"). Warnings are gone, and all seems ok for now.

However, I am not sure if this is enough? I mean, Mantis 1.1.8 works with php 5.3 or not?
Could someone help please.
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Got System Warning: Date()... After Installation

Post by atrol »

Danijel wrote: I mean, Mantis 1.1.8 works with php 5.3 or not?
Maybe, maybe not. You have to try yourself. When 1.1.x has been released (December 2007) there was no PHP 5.3.x available (first version June 2009).
If you want to use 5.3.x I recommend to use no older version than 5.3.3 (probably better is latest stable 5.3.14)

Is there any reason why you don't want to update to latest stable version of MantisBT 1.2.11?
Please use Search before posting and read the Manual
Post Reply