Issue with Error Message and 2020

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 »

this is the tail entry in the timetrex.log file.
---------------[ 17-Jan-2020 17:20:34 +0000 [1579281634.0292] (PID: 17949) ]---------------
DEBUG [L3080] [00023ms]: Misc::getCurrentOSUser(): Running as OS User: www-data
DEBUG [L0972] [00023ms]: Install::checkPHPVersion(): Comparing with Version: 7.4.1
DEBUG [L0972] [00023ms]: Install::checkPHPVersion(): Comparing with Version: 7.4.1
DEBUG [L3080] [00023ms]: Misc::getCurrentOSUser(): Running as OS User: www-data
DEBUG [L0553] [00024ms]: TTi18n::chooseBestLocale(): Unable to find and set a locale.
DEBUG [L0345] [00024ms]: TTDate::setTimeZone(): TimeZone already set to: GMT
DEBUG [L0151] [00024ms]: GLOBAL: Version: 12.0.3 (PHP: v7.4.1) Edition: 10 Production: 1 Server: N/A Database: Type: postgres Name: timetrex Config: /var/www/html/timetrex/includes/../timetrex.ini.php Demo Mode: 0
DEBUG [L0171] [00025ms]: GLOBAL: Lock File: /tmp/timetrex/UnAttended_Upgrade_2737064364.lock
DEBUG [L0084] [00025ms]: LockFile::getCurrentPID(): Current PID: 17949
DEBUG [L0267] [00025ms]: GLOBAL: Checking requirements only...
DEBUG [L0270] [00025ms]: GLOBAL: Launched from web installer...
DEBUG [L2580] [00025ms]: Misc::cleanDir(): Cleaning: /tmp/timetrex Exclude Regex: \.ZIP|\.lock|.state|upgrade_staging
DEBUG [L0972] [00025ms]: Install::checkPHPVersion(): Comparing with Version: 7.4.1
DEBUG [L1608] [00025ms]: Install::checkPHPOpenBaseDir(): Open BaseDir:
DEBUG [L0972] [00025ms]: Install::checkPHPVersion(): Comparing with Version: 7.4.1
DEBUG [L1608] [00025ms]: Install::checkPHPOpenBaseDir(): Open BaseDir:
---------------[ 17-Jan-2020 17:20:34 +0000 [1579281634.054] (PID: 17949) ]---------------

I also note that I have php7.2, php7.3 and php7.4 all present with apt list --installed
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Issue with Error Message and 2020

Post by shaunw »

So that confirms a few things I mentioned previously such as:
1. You have a non-standard PHP installation using the "SURY" repository, not from Ubuntu itself.
2. PHP's PGSQL extension is not enabled.
3. It is PHP v7.4 not v7.2, so you likely not only have two copies of TimeTrex installed but two different versions of PHP too. Definitely not recommended.

All the above is outside the scope of TimeTrex, but definitely should be cleaned up and corrected nonetheless.
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 »

OK I'm now at the Database Configuration screen and using my original userid and password.
I can get into and see the timetrex database using psql but attempting here gives
Screenshot from 2020-01-17 17-14-44.png
Screenshot from 2020-01-17 17-14-44.png (9.56 KiB) Viewed 4743 times
I'm hoping this is the last hurdle. BTW should the extension in php.ini be pgsql of pgsql.so?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Issue with Error Message and 2020

Post by shaunw »

Please check the TimeTrex log file for more information.
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 »

timetrex.log.txt
(939 Bytes) Downloaded 275 times
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 »

After fixing an error in the /etc/hosts file I get the same error and the following:

Result of running php /var/www/html/timetrex/maint/cron.php

Fatal Exception: Code: DBConnectionFailed... Exiting with error code 254!
PHP Warning: Module 'pgsql' already loaded in Unknown on line 0
PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: could not translate host name 'localhost' to address: Temporary failure in name resolution in /var/www/html/timetrex/classes/adodb/drivers/adodb-postgres64.inc.php on line 752

pinging localhost finds 127.0.0.1


Results of tail /var/log/timetrex/timetrex.log:

DEBUG [L0151] [00024ms]: GLOBAL: Version: 12.0.3 (PHP: v7.4.1) Edition: 10 Production: 1 Server: N/A Database: Type: postgres Name: timetrex Config: /var/www/html/timetrex/TimeTrex_Community_Edition_v12.0.3/includes/../timetrex.ini.p
DEBUG [L0151] [00024ms]: GLOBAL: hp Demo Mode: 0
DEBUG [L0171] [00024ms]: GLOBAL: Lock File: /tmp/timetrex/UnAttended_Upgrade_1538322532.lock
DEBUG [L0084] [00024ms]: LockFile::getCurrentPID(): Current PID: 2090
DEBUG [L0267] [00025ms]: GLOBAL: Checking requirements only...
DEBUG [L0270] [00025ms]: GLOBAL: Launched from web installer...
DEBUG [L2580] [00025ms]: Misc::cleanDir(): Cleaning: /tmp/timetrex Exclude Regex: \.ZIP|\.lock|.state|upgrade_staging
DEBUG [L0972] [00025ms]: Install::checkPHPVersion(): Comparing with Version: 7.4.1
DEBUG [L1608] [00025ms]: Install::checkPHPOpenBaseDir(): Open BaseDir:
---------------[ 19-Jan-2020 18:33:25 +0000 [1579458805.5065] (PID: 2090) ]---------------
Post Reply