TimeTrex requires PHP v5.3 or greater!

Ask your questions regarding TimeTrex installation here.
Post Reply
mlecomte
Posts: 2
Joined: Fri Jun 02, 2017 11:13 am

TimeTrex requires PHP v5.3 or greater!

Post by mlecomte » Fri Jun 02, 2017 1:59 pm

Hello,
I am attempting to update from 9.1 to 10.6 on a Centos 6 box.
Originally this install started as a 8.0.X bin but I have previously updated that to 9.1

My issue:

I am unable to get past the installer message warning me that my php version is too low. 5.2.6 or such

I have run a yum update php and updated php.
php -v tells me I have php 5.3.3

Timetrex still insists I have 5.2.6
I downloaded and built 5.6, still same deal.

I went into /var/www/html/timetrex/php and noticed that...hey! This php is separate? ran php -v and it gave me the lower version.
Replaced that php executable with my 5.3.3 but it didn't make a difference.

went into the timetrex.ini.php file and I see there is a way to specify the php path! Awesome! Specified my path to my 5.3.3 php file. Restarted Timetrex. Nope still 5.2.6.

I decided to go wacky (this is a clone of the server so no holds barred!) and I deleted the whole php directory from /var/www/html/timetrex/
the darn thing still sees 5.2.6.

I'm at a loss.

Is there an archived version of Timetrex that still supports PHP 5.2.6 but is reasonably up to date (I am getting a red error message about the age of my current version).

Or is there any other guidance or insight that can be given to why timetrex thinks I still am on PHP 5.2.6?

Thanks

shaunw
Posts: 7483
Joined: Tue Sep 19, 2006 2:22 pm

Re: TimeTrex requires PHP v5.3 or greater!

Post by shaunw » Sat Jun 03, 2017 12:00 pm

If you originally installed TimeTrex from the .bin installer, that installs all required components (PHP, Apache, PostgreSQL) into the TimeTrex directory and utilizes those custom versions of TimeTrex. This installer was originally intended for really old Linux distributions that didn't offer PHP v5.x. All supported Linux distributions have supported PHP v5.x for quite some time now, so the .bin installer was discontinued.

Therefore we recommend that you migrate your TimeTrex installation out of the .bin installer and into your Linux distributions bundled components instead. The process to do this is essentially the same as migrating TimeTrex to entirely new server, you will need to dump the database and import into your distro's own PostgreSQL installation, then copy all other necessary files (storage directory and timetrex.ini.php file) across.

Having said all of that, TimeTrex v10.x actually requires PHP v5.4, so PHP v5.3 will not be enough.

If you have the option of upgrading to a newer Linux distribution while you are at, you may want to consider that, as even PHP v5.4 is the minimum required version and has actually been unsupported for several years now (http://php.net/supported-versions.php) so TimeTrex will be requiring a newer version of it pretty soon.

mlecomte
Posts: 2
Joined: Fri Jun 02, 2017 11:13 am

Re: TimeTrex requires PHP v5.3 or greater!

Post by mlecomte » Mon Jun 05, 2017 11:03 am

Thank you for that information.

I have done what you suggested.
What I've written below is by no means a full install guide.

I have provisioned myself a new RHEL 7 server with a fresh install of Apache , php , and postgres.
Several configurations were needed for each of those applications in regards to permissions for apache, extra extensions for php, and re-creation of users, tables and permissions for postgres.

I very loosely used the directions on https://help.timetrex.com/v10.0/communi ... )%7C_____2
on the migrate to another computer part.

The directions above aren't for linux of course, so it was really just the general steps I was following.

There were definitely a few gotchas! as part of this setup and transfer.

For instance, the new manual installer package doesn't have the backup_database or restore_database scripts, but my old install did. These looks like basic postgres backup and restore commands but I wasn't sure if the syntax would be helpful to others.
I simply copied the commands from the old scripts and re-created them on the new server.

Script for backing up I used on the old server
run the script below as the postgres user (sudo su postgres)

date=`date '+%B_%d_%Y'`
export PGPASSWORD=USEYOUROWN
export PGDATABASE=timetrex
"/var/www/html/timetrex/postgresql/bin/pg_dumpall" -i -c --column-inserts -h localhost -U timetrex -p 5432 > "/var/www/html/timetrex/postgresql/timetrex_database_$date.sql"

I think I modified where the backup was going to be stored because postgres didn't have the permissions to store it in /var/www/html/timetrex/postgresql


script for restore
export PGPASSWORD=USEYOUROWN

if [ -n "$1" ] ; then
echo
echo Attempting to restore SQL dump file: $1...
echo
echo
echo -----WARNING-----WARNING-----WARNING-----WARNING-----
echo
echo RESTORING THIS FILE WILL COMPLETELY OVERWRITE ALL EXISTING DATA...
echo
echo ARE YOU SURE YOU WANT TO DO THIS?
echo
echo -----WARNING-----WARNING-----WARNING-----WARNING-----
echo

read
echo
echo NO REALLY, ALL EXISTING DATA WILL BE DELETED.
echo
echo ARE YOU REALLY SURE YOU WANT TO DO THIS?
echo
read

"/PATH/TO/YOUR/bin/psql" -1 -f "$1" -h localhost -U postgres -p 5432 template1
echo Done.
echo
else
echo "ERROR: Please specify the SQL dump file that you wish to restore."
fi

To restore, I did the steps below using the same username, password, and db name as my original install.
installed postgres, create database DBNAME, create user DBUSER, give user permissions to the DB.
after that, I switched to the postgres user and ran the script above and pointed it at my backup.

Other points of mention which may be obvious to some and apply to all setups of this nature (Centos/RHEL):
make sure you open port 80 in firewalld or iptables
chmod apache:root -R /var/www/html/whereeveryou installed everything
check issues with selinux if you are having persistent permissions errors at the installer section (server can't create directories in template_c...) You can test this by setenforce=0 but best practice is to leave selinux enforced
install additional php extensions (yum install php-soap etc)
edit the php.ini and list the extensions
extension=soap.so etc etc

Hopefully this might help someone who is going through the same process as myself.

Post Reply