Installation dilemma: date() and checksum

Ask your questions regarding TimeTrex installation here.
Post Reply
mkvsshine
Posts: 2
Joined: Tue Jan 26, 2016 1:56 pm

Installation dilemma: date() and checksum

Post by mkvsshine »

Hi, I encountered errors while I install the Linux version of TimeTrex from source.

If I left the code as is, following the instructions, I will get warning that in file "includes/global.inc.php" the function date() is not safe, and the page stuck at the "Initializing..." forever
error 1
error 1
If I manually fix this problem by replace the date() to date_default_timezone_set() in the aforementioned file, then I can go through this "Initializing..." page, and go to the next installation page. While after I accept the terms and fix other privilege related problems, there is a "checksum" error because I edited the file "global.inc.php".
error 2
error 2
So, If I don't edit this file, I met error 1;
If I edit this file, I met error 2.

Now, what should I do?

Please help.

Thanks!
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Installation dilemma: date() and checksum

Post by shaunw »

You should disable display errors in your php.ini file, that will prevent error messages like this from breaking the TimeTrex UI, they can also be a security risk in some cases.

Next you should probably set the default timezone in your php.ini file to prevent this issue from happening in the first place, and with other PHP applications too.

Finally you can force a default timezone in the timetrex.ini.php file (search for "system_timezone"), which will also prevent this issue for just TimeTrex anyways.
mkvsshine
Posts: 2
Joined: Tue Jan 26, 2016 1:56 pm

Re: Installation dilemma: date() and checksum

Post by mkvsshine »

shaunw wrote:You should disable display errors in your php.ini file, that will prevent error messages like this from breaking the TimeTrex UI, they can also be a security risk in some cases.

Next you should probably set the default timezone in your php.ini file to prevent this issue from happening in the first place, and with other PHP applications too.

Finally you can force a default timezone in the timetrex.ini.php file (search for "system_timezone"), which will also prevent this issue for just TimeTrex anyways.
Thank you for your fast reply. Can you give more detail about how to do the steps you mentioned above?
In my php.ini, the error is set off with "display_errors = Off"

Default time zone is also set with "date.timezone = America/New_York"

In the timetrex.ini.php file, I didn't find the "system_timezone" keyword. Search returns no results.

Thanks!!
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Installation dilemma: date() and checksum

Post by shaunw »

In the timetrex.ini.php file, you can set the following:

Code: Select all

[other]
system_timezone = "America/New_York"
Post Reply