Timezone settings ??

If you need support with TeamCal Pro (installation, configuration, usage) post your request here.
Post Reply
pderwael
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 2013-03-26, 11:27
Are you a spam bot?: No

Timezone settings ??

Post by pderwael » 2013-03-26, 12:58

Hi there

I have just installed Tcpro on a LAMP environment: Centos 6.4, Apache 2.2.15, MySQL 5.1.67, PHP 5.3.3 and Tcpro 3.5.002

The installation went fine, but when accessing my Tcpro home page, I get 10+ messages identical to this one

Warning: 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 'Europe/Berlin' for 'CET/1.0/no DST' instead in /var/www/html/config.version.php on line 25

Warning: 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 'Europe/Berlin' for 'CET/1.0/no DST' instead in /var/www/html/includes/functions.tcpro.php on line 1172

Also, it is impossible to log in with the default credentials, but I guess this is due to the previous date/time issue

Any clue on what I should do ?

Thanks!
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 406
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re: Timezone settings ??

Post by George » 2013-03-26, 14:14

Hi pderwael
these are warnings about changed PHP recommendations and appear depending on your PHP version and settings. In the next release I will have them dealt with I hope.
You can place a '@' in front of the function name as a workaround, e.g. @date('Y');. Do so in those two referenced files/lines.

You should still be able to login tho with admin/root or <username>/password. If not, are you getting any error message?
Best regards,
George
pderwael
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 2013-03-26, 11:27
Are you a spam bot?: No

Re: Timezone settings ??

Post by pderwael » 2013-03-26, 14:29

Hi George,

First of all, thank you for the answer
I'm not quite a tecchie... so I will see tonight if I manage to implement your workaround!

Concerning the login, I confirm I cannot login.
I enter the default admin/root user/pass, click <Login> and I'm back to the initial screen showing "You are not logged in.."
The only messages I get are those about the timezone

Patrick

BTW, same login problem with Firefox 10.0.12 esr and IE8
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 406
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re: Timezone settings ??

Post by George » 2013-03-26, 15:08

Hi Patrick
a different workaround is to set the timezone in your PHP.INI. Since you are running LAMP you have access to it. Enter something like

Code: Select all

date.timezone = Europe/Berlin
The list of timezones valid for that entry you can find here:
http://www.php.net/manual/en/timezones.php
pderwael
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 2013-03-26, 11:27
Are you a spam bot?: No

Re: Timezone settings ??

Post by pderwael » 2013-03-26, 15:24

George

I can only repeat myself: will give it a try tonight and thanks again :)

Patrick
pderwael
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 2013-03-26, 11:27
Are you a spam bot?: No

Re: Timezone settings ??

Post by pderwael » 2013-03-26, 21:11

George

Tried both options...

1) done a copy/paste of what you mentioned in /var/www/html/php.ini to that it reads

register_globals=off
CODE: SELECT ALL
date.timezone = Europe/Berlin

service httpd restart

--> same warnings as previously

2) removed the changes in php.ini

3) Changed
$CONF[app_curr_year'] = date('Y');
to
$CONF[app_curr_year'] = @date('Y');
in /var/www/html/config.version.php

and

$today = getdate();
to
$today = @getdate();
in /var/www/html/includes/functions.tcpro.php

service httpd restart

--> the warnings are gone, but as you can see in the screen shot, I have that "datedatedate..." all over the place...
And I still cannot log in yet...

Is there anything else meaningful I can try or should I reinstall tcpro (no production data) ??

Thanks!
Attachments
tcpro 26-03-2013 20-51-32.png
tcpro 26-03-2013 20-51-32.png (16.77 KiB) Viewed 3179 times
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 406
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re: Timezone settings ??

Post by George » 2013-03-26, 21:25

Nice one :shock:
I think the best approach is to change your PHP.INI file. From what you are describing in your post I think you edited the wrong PHP.INI file.
After installing LAMP you should have a folder most probably called "php". That's how it is with XAMPP anyways and it must be similar.
I installed XAMPP an have some folder structure like this:

xampp
- apache
- php
- mysql
- ...

There should be a php.ini file in your 'php' folder. Try to enter the date.timezone setting in that file.
pderwael
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 2013-03-26, 11:27
Are you a spam bot?: No

Re: Timezone settings ??

Post by pderwael » 2013-03-27, 10:00

Hi

I feel that restarting the installation from scratch will be more efficient than trying to find out what I did wrong, when and where !
--> I will reinstall CentOS from scratch in order to ensure there is no remains from Apache/MySQL/PHP and see how far I can go with XAMPP!

Sorry for having been a pain :oops: and thanks again!
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 406
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re: Timezone settings ??

Post by George » 2013-03-28, 16:48

No problem. Hope it works out.
Post Reply