Community Upgrade Issues (DEB/ZIP)

Ask your questions regarding TimeTrex installation here.
Post Reply
iain
Posts: 12
Joined: Thu Jan 19, 2017 5:37 am

Community Upgrade Issues (DEB/ZIP)

Post by iain »

Good Morning Team,

Last week we encountered the red banner advising that the auto-upgrade failed, this has happened before on occasion, so I set about performing the usual upgrade route via re-installing the latest version over the currently installed version, which I've not had issues with before.

Unfortunately, due to a stupid error entirely on my part, I downloaded and installed the DEB version, completely forgetting that we've previously always installed the ZIP version, and this caused a host of unmet dependancies. I performed a full update and upgrade on the Debian 10 box that TimeTrex is installed on, and (at the time) was confused as to why so many unmet dependencies were showing up, specifically due to PHP modules such as SOAP not being enabled when they always had been - turns out the system upgrade also upgraded the PHP versions and it was now looking at the new versions.

I updated the PHP modules and everything eventually worked and upgraded, however - and this is the problem I'm facing now:

This morning I received a further upgrade failed error - this is when I realised my error with the DEB/ZIP versions - the DEB installation threw lots of errors about the database not being configured, but said it was overwriting 12.7.3 with 12.7.4, however upon checking our installation, it was still showing as 12.7.2

So as a result now I have the following installations:
/usr/share/timetrex/html - v12.7.4 (installed by error and not working)
/var/www/timetrex.REDACTED.com - v12.7.2 (live version, working, but out-of-date)

Before I manually upgrade the correct installation by means of the ZIP file, I'm trying to remove the DEB installed version in the incorrect location, however everything I try to do to uninstall it, seems to trigger it to attempt to *install* it again, I've tried 'apt remove' and 'apt purge', but it keeps giving me the following output:

sudo apt remove /var/cache/apt/archives/TimeTrex_Community_Edition.deb
[sudo] password for REDACTED:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'timetrex-community-edition' instead of '/var/cache/apt/archives/TimeTrex_Community_Edition.deb'
timetrex-community-edition is already the newest version (12.7.4).
The following packages were automatically installed and are no longer required:
linux-image-4.19.0-9-amd64 php7.4-bcmath php7.4-gd php7.4-mysql php7.4-zip
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 58 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up timetrex-community-edition (12.7.4) ...
Upgrading TimeTrex database...
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib/php/20200930/pdo_pgsql (/usr/lib/php/20200930/pdo_pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/pdo_pgsql.so (/usr/lib/php/20200930/pdo_pgsql.so: undefined symbol: pdo_parse_params)) in Unknown on line 0
PHP Warning: Module "curl" is already loaded in Unknown on line 0
PHP Warning: Module "pgsql" is already loaded in Unknown on line 0
PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "www-data"
FATAL: password authentication failed for user "www-data" in /usr/share/timetrex/html/classes/adodb/drivers/adodb-postgres64.inc.php on line 752
Fatal Exception: Code: DBConnectionFailed... Exiting with error code 254!
dpkg: error processing package timetrex-community-edition (--configure):
installed timetrex-community-edition package post-installation script subprocess returned error exit status 254
Errors were encountered while processing:
timetrex-community-edition
E: Sub-process /usr/bin/dpkg returned an error code (1)

I'm guessing that the correct copy will remain unaffected as the DEB isn't doing anything with it, which explains why it's still working, however I beleive having these two copies is causing the auto-upgrade process to fail, presumably because it's now trying to upgrade the DEB installation instead of the ZIP installation? I'm hoping that simply removing the DEB version and fixing any potential unmet dependencies after that will fix this, however I'm stuck as it doesn't seem to be honouring the uninstall - could I get some advice please?

I have of course performed a full backup of the VM's disk so can roll it back should the system become irreparably damaged, so am happy to try any suggestions.

Kind regards,
Iain.
iain
Posts: 12
Joined: Thu Jan 19, 2017 5:37 am

Re: Community Upgrade Issues (DEB/ZIP)

Post by iain »

Update: I noticed the line from the previous removal attempt:
"Note, selecting 'timetrex-community-edition' instead of '/var/cache/apt/archives/TimeTrex_Community_Edition.deb'"

So I tried 'sudo apt remove timetrex-community-edition' instead, which seems to have worked.
The correct installation is still working on v12.7.2, so things are looking good.
I'm currently attempting overwrite/upgrade of the installation with the ZIP file.
iain
Posts: 12
Joined: Thu Jan 19, 2017 5:37 am

Re: Community Upgrade Issues (DEB/ZIP)

Post by iain »

OK so that worked, upgrade now fully completed! I had to install and enable the PHP extension INTL - not had that enabled before, so I'm guessing that's a new requirement of v12.7.4 - but it's all working perfectly now.

I guess my last question is:
When I upgraded Debian, it installed PHP 8.0, however TimeTrex is still reporting that it's using 7.4

There's the old addage "If it's not broke, don't fix it", however I'm curious about how it might affect TimeTrex if I was to remove PHP 7.4 (and any older versions) - will TT detect the default change and start using 8.0? Are there any other considerations to removing older versions of PHP?
Are there any drawbacks to running multiple versions of PHP?

...should I just leave well alone? :P
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Community Upgrade Issues (DEB/ZIP)

Post by shaunw »

Definitely not a good idea to have multiple PHP versions installed, as its possible that the maintenance jobs will end up using one version (CLI) and the web interface another (MOD-PHP or PHP-FPM). If PHP v8.0 is already installed, I would recommend going with it, as PHP 7.4 will end active support before the end of this year.
Post Reply