install error

Ask your questions regarding TimeTrex installation here.
Locked
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

install error

Post by Diggy »

Hi.

I've installed Timetrex Standard on a CentOS 3.7 server. Postgresql-8.1.4 is also installed. When I try to run install.php, I get the following errors:

Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /var/www/html/timetrex/classes/modules/core/Environment.class.php on line 30

Fatal error: Undefined class name 'environment' in /var/www/html/timetrex/includes/global.inc.php on line 148

What do these mean, and how do I fix?

Many thanks.

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

Re: install error

Post by mikeb »

Diggy wrote:Hi.

I've installed Timetrex Standard on a CentOS 3.7 server. Postgresql-8.1.4 is also installed. When I try to run install.php, I get the following errors:

Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /var/www/html/timetrex/classes/modules/core/Environment.class.php on line 30

Fatal error: Undefined class name 'environment' in /var/www/html/timetrex/includes/global.inc.php on line 148

What do these mean, and how do I fix?

Many thanks.

Diggy
It appears you may not be using PHP v5. Can you confirm you are in fact using PHP5 and also send me the output of the following commands:

php -v
php -l /var/www/html/timetrex/classes/modules/core/Environment.class.php

Thanks.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Mike,

You're right, I'm running php-4.3.2. Either system requirements weren't listed or (more likely) I didn't read them. So, am I sol if I don't have php5 installed?

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

Post by mikeb »

Diggy wrote:Mike,

You're right, I'm running php-4.3.2. Either system requirements weren't listed or (more likely) I didn't read them. So, am I sol if I don't have php5 installed?

Diggy
TimeTrex does require PHP5, the requirements are posted near the top of http://www.timetrex.com/download.php, however you still have several options.

You can obviously upgrade to PHP5, which is quite easy with most modern Linux distro's and also Windows, (we would be happy to help you with this: http://www.timetrex.com/setup_support.php)
or you could sign-up for our on-demand deployment option and not have to worry about installation or upgrade headaches. Its up to you.

Thanks.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Ok, I've been plugging away at this. I've installed postgres-8.1.4 on a CentOS 4.3 box. Php-5.0.4 is also installed. Now when I run install.php, nothing at all appears in the browser. Huh?

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

Post by mikeb »

Diggy wrote:Ok, I've been plugging away at this. I've installed postgres-8.1.4 on a CentOS 4.3 box. Php-5.0.4 is also installed. Now when I run install.php, nothing at all appears in the browser. Huh?

Diggy
Sorry, I should have been more specific, TimeTrex requires PHP 5.1 or greater. However I think you should at least be able to install it on PHP 5.0.4.

As for the blank page, check the Apache or PHP error logs. You probably have display_errors turned off in your php.ini file, so all errors go to the logs instead.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Mike,

Here's the error from httpd/error_log:

[client 192.168.100.53] PHP Fatal error: Call to undefined function bcscale() in /var/www/html/timetrex/includes/global.inc.php on line 30

Is this due to php-5.0.4 being installed, rather than 5.1? Arrrgh.

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

Post by mikeb »

Diggy wrote:Mike,

Here's the error from httpd/error_log:

[client 192.168.100.53] PHP Fatal error: Call to undefined function bcscale() in /var/www/html/timetrex/includes/global.inc.php on line 30

Is this due to php-5.0.4 being installed, rather than 5.1? Arrrgh.

Diggy
No, that particular error is not due to PHP 5.0.4 instead of PHP 5.1, it is actually due to not having the BCMATH extension installed. Usually the RPM name is:

php-bcmath

This is something we have overlooked in the installer, so I will fix that for the next release.

To save you some time, you will also need these PHP extensions/RPMs:

php-soap
php-mcrypt
php-pear

Normally the installer will alert you to these extensions being missing, but because we missed the bcmath extension you haven't gotten that far yet.

Thanks.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Thanks! I'll add those in the morning and give it a whirl.
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Good morning, folks.

I hate to start out my day this way, but I've reached a high frustration level in my attempts to install Timetrex. Trying to find the components required by the program has been a genuine pita.

By way of constructive criticism to the developers (please bear in mind that I'm grateful to you and all FOSS developers for your time and dedication):

RHEL AS3 and RHEL AS4 (aka RHEL3 and RHEL4), and by extension, CentOS3 and CentOS4 are ubiquitous. As such, I would hope that Timetrex would install relatively easily on them (I don't mind having to do some work, but one reaches a point where it simply is no longer worth the effort). I realize that trying to make software work on all distributions is a tough task (which has given rise to the LSB group, for instance), certainly the program should work on the most popular distros. And, it should work with stock packages, rather than having to go through dependency hell, or having to upgrade/reinstall/recompile. I hope I haven't made any enemies here (my colleagues, at least, think I'm a real nice person :-) ).

All of the above having been said, I've managed to install all of the above components except php-mcrypt, for which rpm compatible with my version of php I can't find. If someone out there has that package for php-5.0.4-4, I'd be grateful if you'd share it (though I suspect it's MIA). At this point, though, install.php still displays a blank page.

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

Post by mikeb »

Diggy wrote:Good morning, folks.

I hate to start out my day this way, but I've reached a high frustration level in my attempts to install Timetrex. Trying to find the components required by the program has been a genuine pita.

By way of constructive criticism to the developers (please bear in mind that I'm grateful to you and all FOSS developers for your time and dedication):

RHEL AS3 and RHEL AS4 (aka RHEL3 and RHEL4), and by extension, CentOS3 and CentOS4 are ubiquitous. As such, I would hope that Timetrex would install relatively easily on them (I don't mind having to do some work, but one reaches a point where it simply is no longer worth the effort). I realize that trying to make software work on all distributions is a tough task (which has given rise to the LSB group, for instance), certainly the program should work on the most popular distros. And, it should work with stock packages, rather than having to go through dependency hell, or having to upgrade/reinstall/recompile. I hope I haven't made any enemies here (my colleagues, at least, think I'm a real nice person :-) ).

All of the above having been said, I've managed to install all of the above components except php-mcrypt, for which rpm compatible with my version of php I can't find. If someone out there has that package for php-5.0.4-4, I'd be grateful if you'd share it (though I suspect it's MIA). At this point, though, install.php still displays a blank page.

Diggy

Hi Diggy,

Thank you for your comments, we appreciate all the constructive feedback we get, good or bad. We realize that PHP5 is not near as commonly installed as PHP4 (most distros now include PHP5 though), however we made a very conscience decision to require PHP5 when we first started TimeTrex many years ago due to its object orientated (OO) programming features. TimeTrex is a large application, over 100,000 lines of code and if it wasn't for PHP5 it would be much more difficult to continue adding features to it. Fortunately PHP5 has allowed us to keep the code extremely clean and therefore new features are a breeze to add.

Having said that, TimeTrex Standard Edition is still in very early beta stages with regards to the installer. Most of the rest of its code has been around and in use by enterprise customers for almost 3 years. So with every piece of constructive critism we get, TimeTrex will improve in leaps and bounds.

Anyways, you should never be getting a blank page. Please check your error logs and report back. You may be able to get away without installing php-mcrypt as well, I would worry about fixing the blank page issue first.

We should be releasing beta2 this afternoon which will hopefully fix many of the issues brought up on the forums in the last week.

Since this issue has been going on for more then a day now, feel free to initiate online chat from our homepage and I will try to assist you more that way.

Thanks.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Hi, Mike.

Apologies for slow response- I'm in a meeting (short break here).

I'm glad you recognize that my "citicism" was stricly constructive. If I can contribute this way toward the program's overall success, then I'm happy.

Since I have to return to my meeting now, I'll post most recent error message from /var/log/httpd/error_log so you can look at it now:

[client 192.168.100.53] PHP Fatal error: Smarty error: unable to write to $compile_dir '/var/www/html/timetrex/templates_c'. Be sure $compile_dir is writable by the web server user. in /var/www/html/timetrex/classes/smarty/libs/Smarty.class.php on line 1095

So, I need to install Smarty? If I missed that requirement, again, apologies.

I'll try to jump aboard live chat latter.

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

Post by mikeb »

Diggy wrote:Hi, Mike.

Apologies for slow response- I'm in a meeting (short break here).

I'm glad you recognize that my "citicism" was stricly constructive. If I can contribute this way toward the program's overall success, then I'm happy.

Since I have to return to my meeting now, I'll post most recent error message from /var/log/httpd/error_log so you can look at it now:

[client 192.168.100.53] PHP Fatal error: Smarty error: unable to write to $compile_dir '/var/www/html/timetrex/templates_c'. Be sure $compile_dir is writable by the web server user. in /var/www/html/timetrex/classes/smarty/libs/Smarty.class.php on line 1095

So, I need to install Smarty? If I missed that requirement, again, apologies.

I'll try to jump aboard live chat latter.

Diggy
Nope, just make sure /var/www/html/timetrex/templates_c is writable by your webserver process.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Meeting's done (whew!).

Ok. With latest suggestion, install.php works! However, here's the response I get in step 2 of the install:

2. System Check Acceptance

In order for your TimeTrex installation to function properly, please ensure all of the system check items listed below are marked as "OK". If any are red, please take the necessary steps to fix them.
PHP Version: OK (ver 5.0.4)
Database Engine: Invalid (postgresql)
PHP SOAP Enabled: OK
PEAR HTML_Progress: Warning: Not Installed. (try running: "pear install --alldeps HTML_Progress")
PEAR HTTP_Download: Warning: Not Installed. (try running: "pear install --alldeps HTTP_Download")
PEAR AJAX (v0.4.1+): Warning: Not Installed. (try running: "pear install --alldeps HTML_AJAX-alpha")
PEAR Mail: Warning: Not Installed. (try running: "pear install --alldeps Mail")
PEAR Mail_Mime: Warning: Not Installed. (try running: "pear install --alldeps Mail_Mime")
Writable TimeTrex Configuration File (timetrex.ini.php): Warning: Not writable
Writable Cache Directory: Warning: Not writable (/tmp/timetrex)
Writable Storage Directory: Warning: Not writable (/var/timetrex/storage)
Writable Log Directory: Warning: Not writable (/var/log/timetrex)
PHP Safe Mode Turned Off: OK
PHP Memory Limit: OK (32M)
Note: Your TimeTrex configuration file (timetrex.ini.php) is located at:
/var/www/html/timetrex/includes/../timetrex.ini.php

Note: Your PHP configuration file (php.ini) is located at:
/etc/php.ini

I can take care of the write permission errors. However, if I try running "pear install --alldeps HTML_Progress", I get:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pgsql.so' - libpq.so.3: cannot open shared object file: No such file or directory in Unknown on line 0
downloading HTML_Progress-1.2.5.tgz ...
Starting to download HTML_Progress-1.2.5.tgz (645,471 bytes)
.........................................................done: 645,471 bytes
Release for 'html_progress' dependency 'HTML_Page2' has state 'beta', requires 'stable'
install failed

Mike, suggestions welcomed.

Diggy
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Sorry to reply to my own reply, but I looked at chucknb's post (similar problem). In that, Mike suggetsed running "pear config-set preferred_state beta" first, then "pear install -f --alldeps HTML_Progress", etc. But, I get the following error with the first command:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pgsql.so' - libpq.so.3: cannot open shared object file: No such file or directory in Unknown on line 0

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

Post by mikeb »

Diggy wrote:Sorry to reply to my own reply, but I looked at chucknb's post (similar problem). In that, Mike suggetsed running "pear config-set preferred_state beta" first, then "pear install -f --alldeps HTML_Progress", etc. But, I get the following error with the first command:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pgsql.so' - libpq.so.3: cannot open shared object file: No such file or directory in Unknown on line 0

Diggy
libpq.so.3 is the PostgreSQL library. You'll notice the requirements page says the Database engine is invalid as well. Because PHP is trying to load that library it shows that PHP _thinks_ it is installed, but either its the wrong version, or the file does not exist. Confirm that your php-pgsql RPM version matches that of your php RPMs.

Check your error logs, they might give more information too, like API version mismatches.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

The following are installed on my system:

[dyioulos@danvers ~]$ rpm -q php
php-5.0.4-4.centos4
[dyioulos@danvers ~]$ rpm -q php-pgsql
php-pgsql-5.0.4-4.centos4

So, the installed php-pgsql version is, indeed, the one for the installed php version.

[Thu Aug 17 17:22:16 2006] [error] [client 192.168.100.53] File does not exist: /var/www/html/timetrex/minmax.js, referer: http://192.168.100.12/timetrex/interfac ... nstall.php
[client 192.168.100.53] script '/var/www/html/timetrex/global.js.php' not found or unable to stat, referer: http://192.168.100.12/timetrex/interfac ... nstall.php
[Thu Aug 17 17:22:16 2006] [error] [client 192.168.100.53] File does not exist: /var/www/html/timetrex/images, referer: http://192.168.100.12/timetrex/interfac ... nstall.php
[client 192.168.100.53] script '/var/www/html/timetrex/global.css.php' not found or unable to stat, referer: http://192.168.100.12/timetrex/interfac ... ements.php
[Thu Aug 17 17:22:21 2006] [error] [client 192.168.100.53] File does not exist: /var/www/html/timetrex/minmax.js, referer: http://192.168.100.12/timetrex/interfac ... ements.php
[client 192.168.100.53] script '/var/www/html/timetrex/global.js.php' not found or unable to stat, referer: http://192.168.100.12/timetrex/interfac ... ements.php
[Thu Aug 17 17:22:21 2006] [error] [client 192.168.100.53] File does not exist: /var/www/html/timetrex/images, referer: http://192.168.100.12/timetrex/interfac ... ements.php

Is this getting better or worse?

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

Post by mikeb »

Diggy wrote:The following are installed on my system:

[dyioulos@danvers ~]$ rpm -q php
php-5.0.4-4.centos4
[dyioulos@danvers ~]$ rpm -q php-pgsql
php-pgsql-5.0.4-4.centos4

So, the installed php-pgsql version is, indeed, the one for the installed php version.

[Thu Aug 17 17:22:16 2006] [error] [client 192.168.100.53] File does not exist: /var/www/html/timetrex/minmax.js, referer: http://192.168.100.12/timetrex/interfac ... nstall.php
[client 192.168.100.53] script '/var/www/html/timetrex/global.js.php' not found or unable to stat, referer: http://192.168.100.12/timetrex/interfac ... nstall.php
[Thu Aug 17 17:22:16 2006] [error] [client 192.168.100.53] File does not exist: /var/www/html/timetrex/images, referer: http://192.168.100.12/timetrex/interfac ... nstall.php
[client 192.168.100.53] script '/var/www/html/timetrex/global.css.php' not found or unable to stat, referer: http://192.168.100.12/timetrex/interfac ... ements.php
[Thu Aug 17 17:22:21 2006] [error] [client 192.168.100.53] File does not exist: /var/www/html/timetrex/minmax.js, referer: http://192.168.100.12/timetrex/interfac ... ements.php
[client 192.168.100.53] script '/var/www/html/timetrex/global.js.php' not found or unable to stat, referer: http://192.168.100.12/timetrex/interfac ... ements.php
[Thu Aug 17 17:22:21 2006] [error] [client 192.168.100.53] File does not exist: /var/www/html/timetrex/images, referer: http://192.168.100.12/timetrex/interfac ... ements.php

Is this getting better or worse?

Diggy
Everything I see there is nothing to worry about. Most of those are caused by your base_url not having /interface at the end. Your base_url in timetrex.ini.php should be more along the lines of:

base_url = /timetrex/interface

Do you have a separate PHP error log? If not, I would enable error logging in php.ini and check that log file. It all comes down to why PHP can't load the PostgreSQL library.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Post by mikeb »

I have released beta2 (the mirrors may need some time to catch up), the installer is improved quite a bit, thanks to the suggestions from yourself and others. Although this version won't fix your immidate issue, it will hopefully be a smoother process overall.

Thanks.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Ok, more progress. I was able to install Pear HTML_Progress (after intsalling php-gd), Pear HTTP_Download, and Pear HTML_Ajax-alpha. BTW, for CentOS 4 installations using the stock php-5.0.4, a good source of php-related rpms is http://ftp.riken.jp/Linux/centos/4.3/ce ... i386/RPMS/.

However, install.php still complains:

2. System Check Acceptance

In order for your TimeTrex installation to function properly, please ensure all of the system check items listed below are marked as "OK". If any are red, please take the necessary steps to fix them.
PHP Version: OK (ver 5.0.4)
Database Engine: Invalid (postgresql)
PHP SOAP Enabled: OK
PEAR HTML_Progress: Warning: Not Installed. (try running: "pear install --alldeps HTML_Progress")
PEAR HTTP_Download: Warning: Not Installed. (try running: "pear install --alldeps HTTP_Download")
PEAR AJAX (v0.4.1+): Warning: Not Installed. (try running: "pear install --alldeps HTML_AJAX-alpha")
PEAR Mail: Warning: Not Installed. (try running: "pear install --alldeps Mail")
PEAR Mail_Mime: Warning: Not Installed. (try running: "pear install --alldeps Mail_Mime")
Writable TimeTrex Configuration File (timetrex.ini.php): OK
Writable Cache Directory: OK
Writable Storage Directory: OK
Writable Log Directory: OK
PHP Safe Mode Turned Off: OK
PHP Memory Limit: OK (32M)

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

Post by mikeb »

Diggy wrote:Ok, more progress. I was able to install Pear HTML_Progress (after intsalling php-gd), Pear HTTP_Download, and Pear HTML_Ajax-alpha. BTW, for CentOS 4 installations using the stock php-5.0.4, a good source of php-related rpms is http://ftp.riken.jp/Linux/centos/4.3/ce ... i386/RPMS/.

However, install.php still complains:

2. System Check Acceptance

In order for your TimeTrex installation to function properly, please ensure all of the system check items listed below are marked as "OK". If any are red, please take the necessary steps to fix them.
PHP Version: OK (ver 5.0.4)
Database Engine: Invalid (postgresql)
PHP SOAP Enabled: OK
PEAR HTML_Progress: Warning: Not Installed. (try running: "pear install --alldeps HTML_Progress")
PEAR HTTP_Download: Warning: Not Installed. (try running: "pear install --alldeps HTTP_Download")
PEAR AJAX (v0.4.1+): Warning: Not Installed. (try running: "pear install --alldeps HTML_AJAX-alpha")
PEAR Mail: Warning: Not Installed. (try running: "pear install --alldeps Mail")
PEAR Mail_Mime: Warning: Not Installed. (try running: "pear install --alldeps Mail_Mime")
Writable TimeTrex Configuration File (timetrex.ini.php): OK
Writable Cache Directory: OK
Writable Storage Directory: OK
Writable Log Directory: OK
PHP Safe Mode Turned Off: OK
PHP Memory Limit: OK (32M)

Diggy

Yeah, there is something not right for sure. PHP isn't finding your PEAR modules that you are installing at all. I'm thinking its a directory mismatch still.

Your biggest issue right now is the PostgreSQL library not working correctly. You need to figure this out first, as it is probably the most difficult issue to resolve.

Grab beta2 and unzip it overtop of your current TimeTrex directory, on the requirements page it has a link to "Detailed PHP Information" that should help us along.

After you get beta2 installed, try to catch me on online chat again if you can.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

[SOLVED]

Post by Diggy »

Hello to all.

With mikeb's patience and help, I at least got past all of the system requirement issues that prevented me from completing the Timetrex install process. I'd like to share what I learned. The following applies to RHEL AS 4/CentOS4.3:

1. I obtained and installed missing module rpms for php-5.0.4-4 from http://ftp.riken.jp/Linux/centos/4.3/ce ... i386/RPMS/. These included php-gd, php-bcmath, php-pear, php-pgsql, and php-soap.

2. I obtained and installed postgresql-8.1.4 rpm from http://dev.centos.org/centos/4.3/testing/i386/RPMS/.

3. CREATE A SYMLINK TO libpq.so.3 (ln -s /usr/lib/libpq.so.4 libpq.so.3). This was a major element in my success.

3. Install the php module Archive_Tar (pear install -f --alldeps Archive_Tar).

4. UPGRADE PEAR (pear upgrade pear). This was another major element!

3. Run http://mytimtrexserver/interface/install/install.php. Add requested php modules/create directories/tweak permissions, as per the install page 2. There's a configuration recheck button on that page. I'd recommend testing your additions/changes. If all's well, every requirement will read "OK".

That should do it.

Diggy
adobrin
Posts: 2
Joined: Sat Aug 26, 2006 3:27 pm

easier install.

Post by adobrin »

Hi.. I'm new here, evaluating the software; hopefully I'll be able to make use of it and join in your community.

Just a suggestion, but its probably easier to install PHP from source, rather than dealing with the extraneous packages. (especially since php5.1 isnt readily available in some places).

this configure line should satisfy the requirements:

./configure --with-apxs2=/usr/bin/apxs2 --with-mysql --with-pdo-mysql --enable-bcmath --with-pgsql --with-pdo-pgsql --enable-soap --with-mcrypt --with-pear

(i use mysql for other apps).

you can get the php source directly from zend.com
Locked