ubuntu 18.04 - php errors on installing community edition.

Ask your questions regarding TimeTrex installation here.
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

due to a disk crash. I obtained a new drive and installed Ubuntu Server 18.o4 from scratch. I then installed Postgresql and PHP 7.2. I can now log in to Postgres and create and access a database locally on the server.
After this I moved Timetrex_Community_Edition.deb file to /var/cache/apt/archives on attempting to install using sudo apt-get install I get:

The following packages have unmet dependencies:
timetrex-community-edition : Depends: php-gettext but it is not installable
Depends: php-imap but it is not installable
Depends: php-intl but it is not installable
Depends: php-soap but it is not installable
Depends: php-zip but it is not installable
Depends: php-mcrypt but it is not installable
Depends: php-mbstring but it is not installable
Depends: php-bcmath but it is not installable
Depends: php-redis but it is not installable
Depends: php-fpm but it is not installable
E: Unable to correct problems, you have held broken packages.

I have tried to install these packages unsuccessfully and using php7.2- instead but this also fails both say "E: Package <package name> has no installation candidate."

I was considering getting Timetrex installed, and running, overcoming the above problems, then replacing the /var/www/html/timetrex directory tree with a backup (.tar.gz) copy of my original. would this work?

Thanks.
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by mikeb »

If you run this command:

Code: Select all

apt-get install php-zip
It should definitely work, if not you likely have something wrong with your APT sources.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

Apparently a lot of modules are no longer in PHP7.2 so I'm researching using an earlier vesion of PHPattempting to install any of the modules that error gives E: unable to locate package php-zip or php7.2-zip or any of the others.
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

reverting to php7.1 reduced the number of errors but still some so I'll try 7.0 next.

posting all this as it may help others!
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by mikeb »

Looking into this further, it appears that the php-mcrypt extension has been discontinued in Ubuntu 18.04, so that should be the only package that you receive an error on. We will be releasing a new version of the .DEB shortly that no longer requires it.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

tried using php 5.6, 7.0, 7.1, 7.2
here are the logs on 7.2 all were similar.

Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
timetrex-community-edition : Depends: php-gettext but it is not installable
Depends: php-imap
Depends: php-zip
Depends: php-mcrypt

trying to install php-gettext or php7.2-gettext
Reading package lists...
Building dependency tree...
Reading state information...
php7.2-common is already the newest version (7.2.9-1+ubuntu18.04.1+deb.sury.org+1).
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.

php-imap/php7.2-imap
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.2-imap : Depends: libc-client2007e but it is not installable

php-zip/pphp7.2-zip
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.2-zip : Depends: libzip4 (>= 1.0) but it is not installable

php-mcrypt/php7.2mcrypt
Reading package lists...
Building dependency tree...
Reading state information...
Package php-mcrypt is a virtual package provided by:
php7.1-mcrypt 7.1.20-1+ubuntu18.04.1+deb.sury.org+1
php5.6-mcrypt 5.6.37-1+ubuntu18.04.1+deb.sury.org+1
php7.0-mcrypt 7.0.31-1+ubuntu18.04.1+deb.sury.org+1

I repeat this happens all the way back to php5.6
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by mikeb »

You aren't using stock Ubuntu 18.04, you are using 3rd party PHP packages instead, so its not something we support.

In that case you should simply download the .ZIP file and do a manual install instead.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

ok tried the .zp install got to the point in the attachment.

Attempting to install the missing php-zip I get an error: The ollowing packages have unmet depenencies:
php7.2zip : depends on libzip4 (>= 1.0) but it is not installable
Screenshot from 2018-08-07 22-14-34.png
Screenshot from 2018-08-07 22-14-34.png (70.53 KiB) Viewed 24514 times
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

`Following this I got php-zip installed:
A temporary solution is to just download the package file from trusted source like: https://packages.ubuntu.com/xenial/libzip4
Afterwards, install it with: dpkg -i libzip4_1.0.1-0ubuntu1_amd64.deb
And the php7.1-zip will install gracefully.

Now I'm at the attached - stopping for the night.

Any advice?
Screenshot from 2018-08-22 00-10-07.png
Screenshot from 2018-08-22 00-10-07.png (77.01 KiB) Viewed 24513 times
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

Maybe I should add this is on a lvm Ubuntu system
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by mikeb »

Attempting to install the missing php-zip I get an error: The ollowing packages have unmet depenencies:
php7.2zip : depends on libzip4 (>= 1.0) but it is not installable
There is something wrong with your OS that is preventing you from installing stock packages, so I would recommend figuring that out first, as its certainly causing you significant headaches.

The "Installing TimeTrex from the .ZIP file" instructions on the following page explains the entire installation process from start to finish, including what commands to run for handling permissions, which should resolve at least some of those errors:
https://www.timetrex.com/how-to-install ... ntu-debian

From a fresh installation of Ubuntu 18.04 the commands on that the above page can basically be copy & pasted and the installation should work with minimal effort.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

With some work to get the required php modules to install and using the .zip package - I am now here which I suspect is a LVM issue since lvdisplay shows an lvsize of 4 GB out of 2,73Tb available.
Attachments
Screenshot from 2018-08-22 22-20-33.png
Screenshot from 2018-08-22 22-20-33.png (59.07 KiB) Viewed 24503 times
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by mikeb »

TimeTrex requires a minimum of 5% free space on the drive, by default most Linux systems reserve that amount for root and will start throwing "out of disk space" error messages to applications running as non-root. Not to mention if your drive is that full it results in severely compromised performance. Best practices usually say 10% is a minimum, with some recommendations saying to always keep 15-20% free.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

It's a brand new Ubuntu Server 18.04 install.
All that has been installed is Apache, Postgres, PHP and Timetrex
PV Size <2.73 TB, VG Size <2.73TB, LV Size 2.73TB
This all worked smoothly with exactly the same install process on Ubunty 16.04. (until the disk dies after 2 years.).
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

I reinstalled everything without LVM and the disk space error went away. I can live with that but now I have a final error with the following:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHP CLI requirements failed while executing
"/usr/bin/php" "/var/www/html/timetrex/tools/unattended_upgrade.php" --config "/var/www/html/timetrex/includes/../timetrex.ini.php" --requirements_only --web_installer
Likely caused by having two PHP.INI files with different settings.Detailed Error Messages

PHP CLI Requirements Output:
----WARNING----WARNING----WARNING-----
--------------------------------------
Minimum PHP Requirements are NOT met!!
--------------------------------------
Failed Requirements: DatabaseType,SOAP,BCMATH,MBSTRING,GETTEXT,GD,JSON,SIMPLEXML,CURL,ZIP
--------------------------------------
PHP INI:
Process Owner:
--------------------------------------
Failed Requirements: Require,DatabaseType,SOAP,BCMATH,MBSTRING,GETTEXT,GD,JSON,SIMPLEXML,CURL,ZIP
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I have /etc/php/7.2/apache2/php.ini and /etc/php/7.2/cli/php.ini

I renamed each temporarily and the poblem was the same.
Each of those php mdles is installed.
Attachments
Screenshot from 2018-08-24 01-19-33.png
Screenshot from 2018-08-24 01-19-33.png (69.49 KiB) Viewed 24494 times
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

Attaching error log
Attachments
php log.txt
(8 KiB) Downloaded 660 times
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by mikeb »

Please follow the instructions here:
https://www.timetrex.com/how-to-install ... ntu-debian
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

Yep they are the instructions I followed to get where I am
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

This line in those instructions:
apt-get install apache2 libapache2-mod-php php php7.2-cgi php7.2-cli php7.2-pgsql php7.2-pspell php7.2-gd php7.2-gettext php7.2-imap php7.2-intl php7.2-json php7.2-soap php7.2-zip php7.2-curl php7.2-ldap php7.2-xml php7.2-xsl php7.2-mbstring php7.2-bcmath postgresql

Now gives selecting php7.2-common instead of php7,2-gettext
Then it says for everything else "Is already the newest version except for:
The following packages have unmet dependencies: php7.2-imap : depends: libc-client2007e but it is not uninstallable
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by mikeb »

You shouldn't be receiving that "The following packages have unmet dependencies: php7.2-imap : depends: libc-client2007e but it is not uninstallable" error message on a stock Ubuntu 18.04 install, you likely have something wrong with your packages. Might want to try "sudo apt-get install -f" to see if that fixes it for you.

Additionally, if the other PHP extension packages are installed, they are not actually being enabled, so TimeTrex can't use them. Normally once the a package is installed its also enabled automatically, though it may require restarting Apache which is shown in the instructions as well.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

OK I cleared the entire disk and installed Ubuntu 18.04 Server from USB selecting only the postgresql opton.
On completion It rebooted and I went straight to your instruction page andtried installing from the .deb package (preceding the apt-get with sudo in each case), it complained that it could not find the PHP modules.

So I went to the Install from zip section and entered:

sudo apt-get install apache2 libapache2-mod-php php php7.2-cgi php7.2-cli php7.2-pgsql php7.2-pspell php7.2-gd php7.2-gettext php7.2-imap php7.2-intl php7.2-json php7.2-soap php7.2-zip php7.2-curl php7.2-ldap php7.2-xml php7.2-xsl php7.2-mbstring php7.2-bcmath postgresql
after giving it a password I got 2 notes 'selecting php7.2-common instead of php7.2-gettext', 'selecting php7.2-xml insted of php7.2 xsl'

tghis was followed by a selection of lines saying unable to locate package followed by coudn't find any package by glob and couldn't find any package by regex this was repeated for each of php7.2imap, hph7.2-intl, php7.2-soap, php7.2-zip, php7.2-mbstring and php7.2-bcmath.

the only other variable at all was when booting the USB to install Ubuntu Server 18.04 I chose UEFI boot.

That is the sum total of steps thus I'm assuming the php in 18.04 has changed from when your instructions were written and tested.

From here the only alternative I see is searching for how to install these php modules on the PHP home site.
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by mikeb »

I personally tested those instructions with a stock minimal Ubuntu 18.04 install, and it worked fine for me.

If you could copy & paste the entire console output here showing the commands that you run and the exact output, that is always much more helpful than a summary of the error.

Its strange that it says it found the packages and decided to use other names for them (which is perfectly normal), but then proceeded to tell you they couldn't be found.

For example php7.2-mbstring definitely exists as shown here:
https://packages.ubuntu.com/search?keyw ... ection=all

It is part of the Ubuntu "universe" repository though, so make sure you have that added to your APT sources.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

Since it is Ubuntu Server - command line only I have no idea if it is even possible to copy and paste the screen.
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

myfile.txt
(3.75 KiB) Downloaded 721 times
Repeated the entire process creating a new 18.04 server usb from th downloaded iso.

By judicious use of &>> myfile.txt and copying and pasting the original commands the attached is what happens.
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: ubuntu 18.04 - php errors on installing community edition.

Post by MickG01 »

I have now got to the situation where the install tries to run with the attached sequence of screens, then it returns to the license screen.

connecting to postgres as user timetrex or user postgres the \dt command shows "Did not find any relations."
\du shows Role: postgres with Superuser, Create role, Create DB, Replication, Bypass RLS - and - timetrex with Create role, Create DB

l shows databases postgres, template0, teplate1, timetrex
timetrex has Owner postgres Encoding UTF8 Collate en_US.UTF8, Ctype en_US.UTF-8, no access privileges.

any suggestions?
Attachments
Screenshot from 2018-08-26 09-36-20.png
Screenshot from 2018-08-26 09-36-20.png (85.1 KiB) Viewed 24478 times
Screenshot from 2018-08-26 09-36-41.png
Screenshot from 2018-08-26 09-36-41.png (42.22 KiB) Viewed 24478 times
Screenshot from 2018-08-26 09-37-08.png
Screenshot from 2018-08-26 09-37-08.png (51.6 KiB) Viewed 24478 times
Screenshot from 2018-08-26 09-37-27.png
Screenshot from 2018-08-26 09-37-27.png (65.25 KiB) Viewed 24478 times
Screenshot from 2018-08-26 09-37-27.png
Screenshot from 2018-08-26 09-37-27.png (65.25 KiB) Viewed 24478 times
Screenshot from 2018-08-26 09-37-27.png
Screenshot from 2018-08-26 09-37-27.png (65.25 KiB) Viewed 24478 times
Screenshot from 2018-08-26 09-37-08.png
Screenshot from 2018-08-26 09-37-08.png (51.6 KiB) Viewed 24478 times
Post Reply