"Maintenance" issue

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

"Maintenance" issue

Post by Diggy »

I had to reinstall Timetrex 1.4 again on a CentOS 4.4 box running MySQL-server-standard-5.0.27-0.rhel4, and various php-5.1.6. On installation, when I get to step 4, where the database is going to be created, I get:

TimeTrex is currently undergoing maintenance. We're sorry for any inconvenience this may cause. Please try back later.

Here's the debug output:

Debug Buffer
============================================================================
Memory Usage: 1947992
----------------------------------------------------------------------------
DEBUG [135]: [Function](): URI: /timetrex/interface/DownForMaintenance.php
DEBUG [137]: [Function](): Production: 1
DEBUG [92]: TTDate::setTimeZone(): Setting TimeZone: PST8PDT
DEBUG [49]: [Function](): Bypassing Authentication
============================================================================

============================================================================
PROFILER OUTPUT
============================================================================
Calls Time Routine
-----------------------------------------------------------------------------
1 0.0000 ms (0.00 %) unprofiled

41.8611 ms (100.00 %) Missed
============================================================================
41.8611 ms (100.00 %) OVERALL TIME
============================================================================

I also get the following emailed error message:

Message 2:
From root@localhost.localdomain Fri Dec 29 09:02:56 2006
Date: Fri, 29 Dec 2006 06:02:56 -0800
To: root@localhost.localdomain
Subject: TimeTrex - Error!
From: timetrex@localhost.localdomain

DEBUG [137]: <b>[Function]()</b>: Production: 1<br>
DEBUG [92]: <b>TTDate::setTimeZone()</b>: Setting TimeZone: PST8PDT<br>

Is my problem caused, in fact, because of an incorrect time setting? System time is correct. Anyway, can someone help?

Thanks, and a Happy New Year to all.

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

Post by shaunw »

What does your PHP error log say?
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

PHP error log output:

[29-Dec-2006 11:31:49] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/odbc.so' - /usr/lib/php/modules/odbc.so: undefined symbol: empty_string in Unknown on line 0
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

That error tells me there is probably something wrong with your PHP installation. The first step is to correct that so you aren't seeing the error anymore. Try disabling the ODBC extension if you can, or try installing the proper version of it that matches your PHP installation.
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Yes, true, I did have to update a couple of php modules, but only after emerging from deep within rpm dependency hell. Now, at least, no more php errors. But I still get the "Maintenance" error in step 4.
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Ok, let me add to the mystery. This could be my fault (although I'm not sure how I could have caused it) but, just for fun I thought I'd try using Timetrex with postgresql-8.1.4-1 (which I've used in the past) to see if I could sidestep the "Maintenance" issue. Timetrex.ini.php is configured to use postgresql, but it doesn't appear in the Database Type dropdown. Only MySQL appears. Huh?

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

Post by shaunw »

The "Down for Maintenance" page is shown when a major error occurs. Usually because TimeTrex is unable to make a connection to the database server, or access is being denied due to incorrect permission settings. Setting the debug verbosity to 11 should expose these issues.

The reason postgres isn't appearing in the dropdown box is because the postgres PHP extension isn't loaded.
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

I can't add the php-pgsql module because of a major dependency issue (wants postgresql-libs-7.4.13-2, not the installed 8.1.4-1). Arrrgh!!!
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

More info. - if I set debug verbosity to 11, I can't get beyond step 1 in the install process. I stay on the license page.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Have a look at the last post on this topic to see how to get more debug information from the installer:

http://forums.timetrex.com/viewtopic.php?t=81
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Despite trying to get the latest version working, or at least getting meaningful debug info., I seem to have failed on both counts. So, for grins, I set up another box, this time using the xampp stack. This time, rather than get a "maintenance" page in step 4, I got a blank page - rrrrrrrrrr!

The last version I was able to get up and running was 1.4.0-beta. Unfortunately (and probably stoopidly), I waxed it from my system. Can I get a copy of that version somewhere so I can try loading it up and see if I can get it working?

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

Post by shaunw »

Blank pages almost definitely mean a SQL error, or PHP fatal error. You should certainly have something in your logs, and if not your php.ini isn't correct.

You can download any previous version of TimeTrex from our sourceforge download page.

http://sourceforge.net/project/showfile ... _id=174864
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

What linux distro do you recommend loading Timetrex on? I've had no success with CentOS 4.4/RHEL AS 4 without going through (and never emerging from) rpm dependency hell.

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

Post by shaunw »

Any modern distribution that comes with PHP 5+ out of the box is fine. Fedora, Mandriva, Debian all work well.
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Thanks. I've installed VMWare Server on one of my machines, so I can add on of those distros as a vm and give Timetrex another try. But, does this mean that Timetrex won't run on say, RHEL 4, without some serious, and time-consuming, changes (afaik, php 4 and postgresql 7 are the default installs in this distro)?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

TimeTrex will run on any distro that can meet TimeTrex's minimum requirements of PHP v5+ and MySQL v4.1+ or Postgres v8.0+. On older distro's that usually requires using non-standard packages.
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Please don't misunderstand me - I think Timtrex is a very good app. that can become great. I'm not trying to start a fw here, but it strikes me as odd that there is so much effort needed to get it running on as "mainstream" a distro as CentOS 4 or RHEL 4. The "modern" distros you mentioned are not what I consider to be true production distros (with the exception of debian). Fedora changes way too often to be used in my data center and (sadly) Mandriva has been relegated to the fringe. Even debian sarge uses postgresql-7.x as its stock install, from what I can gather. If postgres-8.x even comes out of the debian testing branch, forgetting unstable altogether, I personally would think twice about using it in production.

Again, I don't want to alienate anyone here. I want to see Timetrex succeed, and am willing to help test it, time and resources permitting. I also understand what a beast it must be to program so much functionality into the program. But, I think the program's best shot for success lies with bigger companies which are using more mainstream distros, and which don't want to have to mess around too long, if at all, with having to install non-standard packages in order to get the program to work.

Just my $0.02US.

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

Post by mikeb »

Hi Diggy, we understand that the TimeTrex requirements make it difficult to install on older distributions, mainly because of the PHP v5.0 requirement. TimeTrex will probably run fine on PostgreSQL v7.x, but we don't test it with that version. Requiring PHP v5.0 was a calculated decision that we made when it was still in beta testing over three years ago.

The reason we made that decision was because PHP v5 offered us all kinds of capabilities that v4 did not that would greatly decrease development and maintenance costs as TimeTrex matured. We directly attribute this to the fact that we have been able to add such a wide range of functionality to TimeTrex in such a short period of time.

We know this decision has limited our install base somewhat, but we believe in the next year or two when distro's catch up that it will be a non-issue. In the mean time, if you don't want to have to worry about installing or upgrading TimeTrex, we do offer TimeTrex hosting at a very reasonable rate.

Regardless, we do appreciate your feedback and any testing that you have put TimeTrex through. Every bit helps.
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. Thanks for the reply.

I fully understand your wanting to use the functionality pf PHP 5. I guess part of my frustration lies with the fact that I had Timetrex working in CentOS 3.8, with php-5.0.4 and postgresql-8.1.4 previously. I reinstalled everything from the OS up (or, at least, thought I did), and now can't get Timetrex to work regardless of what I try. For example, I've installed, or tried to install various versions of php, mysql, and postgresql. Currently, php-5.1.6, mysql-5.0.27, and postgresql-8.2 are installed. Anyway, I guess I'll just keep hacking.

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

Post by Diggy »

Thought I'd try rolling back to postgresql-7.4.13-2.RHEL4.1 and try again. Database connectivity works, but step 4 (database creation) once again produces a blank page. The database is created, but is not populated with any tables.

From timetrex.log:

---------------[ Tue, 09 Jan 2007 06:26:12 -0800 (PID: 4763) ]---------------
---------------[ Tue, 09 Jan 2007 06:32:54 -0800 (PID: 4759) ]---------------
DEBUG [135]: <b>[Function]()</b>: URI: /timetrex/interface/install/DatabaseConfig.php?data%5Btype%5D=postgres8&data%5Bhost%5D=localhost&data%5Bdatabase_name%5D=timetrex&data%5Buser%5D=timetrex&data%5Bpassword%5D=timetracker&data%5Bpriv_user%5D=dyioulos&data%5Bpriv_password%5D=Diggy152&action=Test+Connection<br>
DEBUG [137]: <b>[Function]()</b>: Production: 0<br>
DEBUG [92]: <b>TTDate::setTimeZone()</b>: Setting TimeZone: PST8PDT<br>
DEBUG [49]: <b>[Function]()</b>: Bypassing Authentication<br>
DEBUG [67]: <b>Install::isInstallMode()</b>: Install Mode is ON<br>
DEBUG [236]: <b>Install::checkDatabaseExists()</b>: Database Name: timetrex<br>
DEBUG [246]: <b>Install::checkDatabaseExists()</b>: Exists - Database Name: timetrex<br>
DEBUG [141]: <b>[Function]()</b>: Testing connection as priv user<br>
DEBUG [93]: <b>URLBuilder::getURL()</b>: URL Values: v=1.4.0S&page=database_config&priv_user=dyioulos<br>
---------------[ Tue, 09 Jan 2007 06:32:54 -0800 (PID: 4759) ]---------------
---------------[ Tue, 09 Jan 2007 06:32:54 -0800 (PID: 4761) ]---------------
DEBUG [135]: <b>[Function]()</b>: URI: /timetrex/interface/Login.php<br>
DEBUG [137]: <b>[Function]()</b>: Production: 0<br>
DEBUG [92]: <b>TTDate::setTimeZone()</b>: Setting TimeZone: PST8PDT<br>
DEBUG [49]: <b>[Function]()</b>: Bypassing Authentication<br>
---------------[ Tue, 09 Jan 2007 06:32:54 -0800 (PID: 4761) ]---------------

From php_error log:

[09-Jan-2007 09:25:59] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_pgsql.so' - /usr/lib/php/modules/pdo_pgsql.so: undefined symbol: pdo_raise_impl_error in Unknown on line 0

Any ideas at all?

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

Post by shaunw »

Unable to load dynamic library '/usr/lib/php/modules/pdo_pgsql.so'
Anytime you get a "unable to load dynamic library" error from PHP, you have two choices. Fix the library, or disable it. In this case you shouldn't need pdo_pgsql.so (for TimeTrex anyways) so I would remove it from your php.ini file.

TimeTrex uses pgsql.so instead.
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

Hmmm. Don't seem to find any reference to pdo_pgsql.so in php.ini. Regardless, this error has no affect on Timetrex anyway, correct?

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

Post by shaunw »

Some PHP installations have .ini files in /etc/php.d/ or similar directory that enable specific extensions. Did you look there?

Reading the log closer, it is just a warning, so that specific message shouldn't be causing the blank page.

You don't still have your debug verbosity set to 11 do you?

Blank pages are usually caused by a PHP fatal error, often it is logged, but not always. Have you tried enabling display_errors in your php.ini file?
Diggy
Posts: 53
Joined: Wed Aug 16, 2006 10:40 am

Post by Diggy »

There is a php.d directory with a pdo_pgsql.ini file in it, so I disabled that extension. Thanks for the tip.

Debug verbosity is not set to 11.

I have enabled display_errors in my php.ini file.

I'm not sure what I did ('cause of hacked around so much), but I just got the following output while trying to move forward:

atal error: Uncaught exception 'ADODB_Exception' with message 'postgres7 error: [-1: ERROR: unrecognized configuration parameter "default_tablespace"] in adodb_throw( SET default_tablespace = '', ) ' in /var/www/html/timetrex/classes/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /var/www/html/timetrex/classes/adodb/adodb.inc.php(221): adodb_throw('postgres7', 'adodb_throw', -1, 'ERROR: unrecog...', '??SET default_t...', false, Object(ADODB_postgres7)) #1 /var/www/html/timetrex/classes/adodb/adodb.inc.php(886): ADODB_TransMonitor('postgres7', 'EXECUTE', -1, 'ERROR: unrecog...', '??SET default_t...', false, Object(ADODB_postgres7)) #2 /var/www/html/timetrex/classes/adodb/adodb.inc.php(861): ADOConnection->_Execute('??SET default_t...', false) #3 /var/www/html/timetrex/classes/modules/install/InstallSchema_Base.class.php(100): ADOConnection->Execute('??SET default_t...') #4 /var/www/html/timetrex/classes/modules/install/InstallSchema_Base.class.php(144): InstallSchema_Base->_InstallSchema() #5 [internal function]: I in /var/www/html/timetrex/classes/adodb/adodb-exceptions.inc.php on line 78

Hopefully we're on to something.

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

Post by shaunw »

Remove the default_tablespace line from classes/modules/install/sql/pgsql/1000A.sql and try again.

This is because pgsql v7.4 lacks tablespace functionality.
Locked